We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33c86e9 commit 0e10444Copy full SHA for 0e10444
apps/landing/src/components/Header/Menu.tsx
@@ -2,14 +2,18 @@
2
import { Text } from '@devup-ui/react'
3
import { usePathname } from 'next/navigation'
4
5
+import { URL_PREFIX } from '../../constants'
6
+
7
interface MenuProps {
8
children?: React.ReactNode
9
keyword: string
10
}
11
12
export function Menu({ children, keyword }: MenuProps) {
13
const path = usePathname()
- const selected = path.startsWith(`/${keyword}`)
14
+ const selected =
15
+ path.startsWith(`${URL_PREFIX}/${keyword}`) ||
16
+ path.startsWith(`/${keyword}`)
17
return (
18
<Text
19
color={selected ? '$primary' : '$title'}
0 commit comments