Skip to content

Commit

Permalink
⚙️ Fix types.
Browse files Browse the repository at this point in the history
  • Loading branch information
pheralb committed Jun 11, 2023
1 parent 76cabd2 commit 874876f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/routes/directory/[slug]/+page.svelte
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
6 changes: 2 additions & 4 deletions src/routes/directory/[slug]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

1 comment on commit 874876f

@vercel
Copy link

@vercel vercel bot commented on 874876f Jun 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

svgl – ./

svgl.vercel.app
svgl-git-main-pheralb.vercel.app
svgl-pheralb.vercel.app

Please sign in to comment.