remove relatime notification subscription

This commit is contained in:
Christian Beutel
2025-08-23 14:56:25 +02:00
parent 089ce933dd
commit 2aad94058a

View File

@@ -3,7 +3,7 @@
beforeNavigate,
goto,
invalidate,
invalidateAll
invalidateAll,
} from "$app/navigation";
import { page } from "$app/state";
@@ -24,7 +24,10 @@
import PocketBase from "pocketbase";
import { browser } from "$app/environment";
interface Props { data: LayoutData; children?: Snippet }
interface Props {
data: LayoutData;
children?: Snippet;
}
let { data, children }: Props = $props();
@@ -39,18 +42,6 @@
if (page.data.origin != location.origin) {
showWarning = true;
}
const pb = new PocketBase(env.PUBLIC_POCKETBASE_URL);
if (browser) {
pb.authStore.loadFromCookie(document.cookie);
}
pb.collection("notifications").subscribe("*", async (e) => {
if (e.action === "create") {
await invalidateAll();
}
});
});
let hideDemoHint = $state(false);