Add disable attribute for no permission buttons and shorten query param names

This commit is contained in:
thiloho
2024-10-19 17:55:02 +02:00
parent 185aeea4e5
commit b1a59e38c1
22 changed files with 292 additions and 147 deletions

View File

@@ -10,7 +10,7 @@ import { join } from "node:path";
import { render } from "svelte/server";
import type { Actions, PageServerLoad } from "./$types";
export const load: PageServerLoad = async ({ params, fetch }) => {
export const load: PageServerLoad = async ({ params, fetch, parent }) => {
const websiteOverview: WebsiteOverview = (
await apiRequest(
fetch,
@@ -27,10 +27,13 @@ export const load: PageServerLoad = async ({ params, fetch }) => {
const { websitePreviewUrl, websiteProdUrl } = await generateStaticFiles(websiteOverview);
const { permissionLevel } = await parent();
return {
websiteOverview,
websitePreviewUrl,
websiteProdUrl
websiteProdUrl,
permissionLevel
};
};