forked from blisstown/campfire
fixed login flow inconsistency
This commit is contained in:
parent
998e8f2517
commit
abab0df83f
10 changed files with 65 additions and 45 deletions
|
@ -1,10 +1,16 @@
|
|||
<script>
|
||||
import { notifications, getNotifications } from '$lib/notifications.js';
|
||||
import { logged_in } from '$lib/stores/user.js';
|
||||
import { goto } from '$app/navigation';
|
||||
import { get } from 'svelte/store';
|
||||
import Notification from '$lib/ui/Notification.svelte';
|
||||
|
||||
if (!get(logged_in)) goto("/");
|
||||
|
||||
getNotifications();
|
||||
/*
|
||||
document.addEventListener("scroll", event => {
|
||||
if (get(logged_in) && get(page).url.pathname !== "/") return;
|
||||
if (window.innerHeight + window.scrollY >= document.body.offsetHeight - 2048) {
|
||||
getNotifications();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue