mirror of
https://github.com/pheralb/svgl.git
synced 2024-11-10 14:46:54 +08:00
⚙️ Fix types.
This commit is contained in:
parent
76cabd2923
commit
874876fc8e
@ -1,9 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { PageData } from './$types';
|
import type { PageData } from './$types';
|
||||||
import type { iSVG } from '@/types/svg';
|
import type { iSVG } from '@/types/svg';
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
let svgsByCategory = data.props?.svgs || [];
|
let svgsByCategory = data.svgs || [];
|
||||||
let category = data.props?.category || '';
|
let category = data.category || '';
|
||||||
|
|
||||||
// Components:
|
// Components:
|
||||||
import Container from '@/components/container.svelte';
|
import Container from '@/components/container.svelte';
|
||||||
|
@ -16,9 +16,7 @@ export const load = (async ({ params }) => {
|
|||||||
const svgsByCategory = svgs.filter((svg: iSVG) => svg.category.toLowerCase() === slug);
|
const svgsByCategory = svgs.filter((svg: iSVG) => svg.category.toLowerCase() === slug);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: {
|
category: slug as string,
|
||||||
category: slug,
|
svgs: svgsByCategory
|
||||||
svgs: svgsByCategory
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}) satisfies PageLoad;
|
}) satisfies PageLoad;
|
||||||
|
Loading…
Reference in New Issue
Block a user