+ {#if $notifications.length === 0}
+
+ fetching notifications...
+
+ {:else}
+ {#each $notifications as notif}
+
+ {/each}
+ {/if}
+
+
+
diff --git a/src/routes/post/[id]/+page.svelte b/src/routes/post/[id]/+page.svelte
index e3df0dc..d9160ee 100644
--- a/src/routes/post/[id]/+page.svelte
+++ b/src/routes/post/[id]/+page.svelte
@@ -2,6 +2,8 @@
import { client } from '$lib/client/client.js';
import * as api from '$lib/client/api.js';
import { get } from 'svelte/store';
+ import { goto, afterNavigate } from '$app/navigation';
+ import { base } from '$app/paths'
import Post from '$lib/ui/post/Post.svelte';
import Button from '$lib/ui/Button.svelte';
@@ -13,6 +15,12 @@
goto("/");
}
+ let previous_page = base;
+
+ afterNavigate(({from}) => {
+ previous_page = from?.url.pathname || previous_page
+ })
+
$: post = (async resolve => {
const post_data = await get(client).getPost(data.post_id, 0, false);
if (!post_data) {
@@ -49,16 +57,19 @@
{#if !error}