Update to Astro 4.5
This commit is contained in:
@@ -5,17 +5,14 @@ import {t} from "astro-i18n";
|
||||
---
|
||||
|
||||
<PageLayout title={t("dashboard.page")}>
|
||||
<script>
|
||||
<script is:inline data-astro-rerun>
|
||||
import {l} from "../util/util";
|
||||
import {navigate} from "astro:transitions/client";
|
||||
|
||||
document.addEventListener("astro:page-load", () => {
|
||||
if (window.location.href.endsWith("/dashboard") || window.location.href.endsWith("/dashboard/")) {
|
||||
if ((localStorage.getItem("sw-session") ?? "") === "") {
|
||||
navigate(l("/login"), {});
|
||||
}
|
||||
if (window.location.href.endsWith("/dashboard") || window.location.href.endsWith("/dashboard/")) {
|
||||
if ((localStorage.getItem("sw-session") ?? "") === "") {
|
||||
navigate(l("/login"), {});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<Dashboard client:only="svelte" />
|
||||
</PageLayout>
|
||||
Reference in New Issue
Block a user