New dashboard done

This commit is contained in:
Mawoka
2023-05-14 11:27:46 +02:00
parent 75d736c0ad
commit fd9e5dec38
8 changed files with 139 additions and 48 deletions
@@ -6,6 +6,7 @@
<script lang="ts">
import type { Data } from '$lib/quiztivity/types';
import Editor from '$lib/quiztivity/editor.svelte';
import { goto } from '$app/navigation';
let data: Data = { pages: [], id: undefined, title: '' };
let saving = false;
@@ -24,7 +25,7 @@
body: stringification
});
if (res.ok) {
// await goto("/dashboard")
await goto('/dashboard');
} else {
alert("Couldn't save");
}
@@ -6,6 +6,7 @@
<script lang="ts">
import type { PageData } from './$types';
import Editor from '../../../lib/quiztivity/editor.svelte';
import { goto } from '$app/navigation';
export let data: PageData;
@@ -25,7 +26,7 @@
body: stringification
});
if (res.ok) {
// await goto("/dashboard")
await goto('/dashboard');
} else {
alert("Couldn't save");
}