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">
|
||||
import type { PageData } from './$types';
|
||||
import type { iSVG } from '@/types/svg';
|
||||
|
||||
export let data: PageData;
|
||||
let svgsByCategory = data.props?.svgs || [];
|
||||
let category = data.props?.category || '';
|
||||
let svgsByCategory = data.svgs || [];
|
||||
let category = data.category || '';
|
||||
|
||||
// Components:
|
||||
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);
|
||||
|
||||
return {
|
||||
props: {
|
||||
category: slug,
|
||||
svgs: svgsByCategory
|
||||
}
|
||||
category: slug as string,
|
||||
svgs: svgsByCategory
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
|
Loading…
Reference in New Issue
Block a user