fix: sidebar link hightlight (#22035)

* fix: sidebar link hightlight

* check if current route start with href
This commit is contained in:
Alex 2025-09-15 21:19:55 -05:00 committed by GitHub
parent 01fddd58c6
commit 3d883b27aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,7 +28,7 @@
}: Props = $props();
$effect(() => {
isSelected = (page.url.pathname.match(/^\/(admin|user)\/[^/]*/) || [])[0] === href;
isSelected = page.url.pathname.startsWith(href);
});
</script>