fix: Update header button variant based on the active route (#4207) (#4214)

- Added logic to change button variant to "primary" or "secondary"
  based on the current pathname, including the "/flows" route.

Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
This commit is contained in:
Vinícios Batista da Silva 2024-10-21 11:17:43 -03:00 committed by GitHub
commit 48b80e146f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,6 +100,7 @@ export default function Header(): JSX.Element {
className="gap-2"
variant={
location.pathname.includes("/all") ||
location.pathname.includes("/flows") ||
location.pathname.includes("/components")
? "primary"
: "secondary"