remove relatime notification subscription
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user