⚙️ Fix types.

This commit is contained in:
pheralb 2023-06-11 12:41:09 +01:00
parent 76cabd2923
commit 874876fc8e
2 changed files with 5 additions and 6 deletions

View File

@ -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';

View File

@ -16,9 +16,7 @@ export const load = (async ({ params }) => {
const svgsByCategory = svgs.filter((svg: iSVG) => svg.category.toLowerCase() === slug);
return {
props: {
category: slug,
category: slug as string,
svgs: svgsByCategory
}
};
}) satisfies PageLoad;