Some Code Cleanup
This commit is contained in:
@ -88,12 +88,12 @@ const ogImage = await getImage({
|
||||
)}
|
||||
<Content />
|
||||
<script>
|
||||
import type {ExtendedEvent} from "@types/event";
|
||||
import FightTable from "@components/FightTable.svelte";
|
||||
// @ts-expect-error Import Schenanigans
|
||||
import {get} from "svelte/store";
|
||||
import {eventRepo} from "@repo/repo";
|
||||
import GroupTable from "@components/GroupTable.svelte";
|
||||
import {eventRepo} from "../../components/repo/event";
|
||||
import type {ExtendedEvent} from "@type/event";
|
||||
const eventMounts: Map<string, ((ev: ExtendedEvent) => void)[]> = new Map();
|
||||
|
||||
class FightTableElement extends HTMLElement {
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -7,11 +7,10 @@ import localBau from "@images/2023-10-08_20.43.43.png";
|
||||
---
|
||||
|
||||
<NavbarLayout title={t("login.page")}>
|
||||
<script>
|
||||
<script is:inline>
|
||||
import {l} from "../util/util";
|
||||
import {AES} from "crypto-js";
|
||||
|
||||
if (AES.decrypt(localStorage.getItem("sw-session") ?? "", import.meta.env.PUBLIC_SECRET)?.toString() !== "") {
|
||||
if ((localStorage.getItem("sw-session") ?? "") !== "") {
|
||||
window.location.href = l("/dashboard");
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user