Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix navlink wrongly highlight when user is in /explore and /feature page #1334

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@instill-ai/toolkit",
"version": "0.97.0-rc.24",
"version": "0.97.0-rc.28",
"description": "Instill AI's frontend toolkit",
"repository": "https://github.com/instill-ai/design-system.git",
"bugs": "https://github.com/instill-ai/design-system/issues",
Expand Down
3 changes: 2 additions & 1 deletion packages/toolkit/src/components/top-bar/ExploreLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import cn from "clsx";
export const ExploreLink = () => {
const pathname = usePathname();

const isActive = pathname.startsWith("/hub");
const isActive =
pathname.startsWith("/explore") || pathname.startsWith("/featured");

return (
<div className="my-auto flex flex-row gap-x-1">
Expand Down
3 changes: 2 additions & 1 deletion packages/toolkit/src/components/top-bar/NavLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const navLinkItems: NavLinkProps[] = [
strict: true,
},
{
pathname: "dashboard/pipeline",
pathname: "dashboard",
Icon: Icons.BarChartSquare02,
title: "Dashboard",
},
Expand Down Expand Up @@ -133,6 +133,7 @@ export const NavLinks = ({ isExploreRoute }: { isExploreRoute?: boolean }) => {
Icon={Icon}
title={title}
isExploreRoute={isExploreRoute}
strict={true}
/>
))
: null}
Expand Down
Loading