feat: optimize some stuff

This commit is contained in:
2024-04-08 20:51:10 +02:00
parent cc6ea4ed22
commit 2037ebd4e1
3 changed files with 9 additions and 7 deletions

View File

@@ -4,7 +4,7 @@ import Logo from "./Logo.astro";
import ToggleTheme from "@components/ThemeToggle.svelte";
function isActive(path: string) {
return Astro.url.pathname === path;
return Astro.url.pathname.startsWith(path);
}
const t = useTranslations(Astro.url);