Some Code Cleanup
This commit is contained in:
@ -5,10 +5,9 @@ import {t} from "astro-i18n";
|
||||
---
|
||||
|
||||
<PageLayout title={t("dashboard.page")}>
|
||||
<script>
|
||||
import {AES} from "crypto-js";
|
||||
<script is:inline>
|
||||
import {l} from "../util/util";
|
||||
if (AES.decrypt(localStorage.getItem("sw-session") ?? "", import.meta.env.PUBLIC_SECRET)?.toString() === "") {
|
||||
if ((localStorage.getItem("sw-session") ?? "") === "") {
|
||||
window.location.href = l("/login");
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user