mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix: sidebar link hightlight (#22035)
* fix: sidebar link hightlight * check if current route start with href
This commit is contained in:
parent
01fddd58c6
commit
3d883b27aa
1 changed files with 1 additions and 1 deletions
|
|
@ -28,7 +28,7 @@
|
|||
}: Props = $props();
|
||||
|
||||
$effect(() => {
|
||||
isSelected = (page.url.pathname.match(/^\/(admin|user)\/[^/]*/) || [])[0] === href;
|
||||
isSelected = page.url.pathname.startsWith(href);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue