mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-26 18:55:44 +02:00
convert layout load function into page load function
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
import { resolve } from '$app/paths';
|
||||
import type { components } from '$lib/api/api';
|
||||
|
||||
let requests: components['schemas']['RichSeasonRequest'][] = $state(page.data.requestsData);
|
||||
let requests: components['schemas']['RichSeasonRequest'][] = $derived(page.data.requestsData);
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { LayoutLoad } from './$types';
|
||||
import type { PageLoad } from './$types';
|
||||
import client from '$lib/api';
|
||||
|
||||
export const load: LayoutLoad = async ({ fetch }) => {
|
||||
export const load: PageLoad = async ({ fetch }) => {
|
||||
const { data } = await client.GET('/api/v1/tv/seasons/requests', { fetch: fetch });
|
||||
return {
|
||||
requestsData: data
|
||||
Reference in New Issue
Block a user