From b519903c0d7ff248c18a301a10b3345a018b9f17 Mon Sep 17 00:00:00 2001 From: nurRiyad Date: Wed, 30 Oct 2024 23:46:11 +0600 Subject: [PATCH] Fix active link issue in navbar Signed-off-by: nurRiyad --- components/main/header.vue | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/components/main/header.vue b/components/main/header.vue index c968880..1f73e4c 100644 --- a/components/main/header.vue +++ b/components/main/header.vue @@ -5,6 +5,11 @@ const colorMode = useColorMode() function onClick(val: string) { colorMode.preference = val } + +const route = useRoute() +function isActive(path: string) { + return route.path.startsWith(path) +} - -