Add collaborator page

This commit is contained in:
Thilo Hohlt
2024-08-05 19:33:35 +02:00
parent 62db2776a7
commit 9f948ba0d4
11 changed files with 470 additions and 173 deletions

View File

@@ -26,7 +26,7 @@ export const load: PageServerLoad = async ({ params, fetch, cookies, locals }) =
};
export const actions: Actions = {
publishWebsite: async ({ request, fetch, cookies, params, locals }) => {
publishWebsite: async ({ request, params, locals }) => {
const data = await request.formData();
const websiteOverview = JSON.parse(data.get("website-overview") as string);

View File

@@ -1,11 +1,14 @@
<script lang="ts">
import { enhance } from "$app/forms";
import WebsiteEditor from "$lib/components/WebsiteEditor.svelte";
import SuccessOrError from "$lib/components/SuccessOrError.svelte";
import type { ActionData, PageServerData } from "./$types";
const { data, form } = $props<{ data: PageServerData; form: ActionData }>();
</script>
<SuccessOrError success={form?.success} message={form?.message} />
<WebsiteEditor
id={data.website.id}
title={data.website.title}