Update dynamic route.

This commit is contained in:
pheralb 2023-03-19 20:22:36 +00:00
parent 4b36ee02ba
commit 22adf5919e
2 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,7 @@
import type { iSVG } from '@/types/svg';
export let data: PageData;
let svgsByCategory = data.props?.svgs || [];
let category = data.props?.category || '';
// Components:
import Container from '@/components/container.svelte';
@ -32,7 +33,7 @@
<Search
bind:searchTerm
on:input={searchSvgs}
placeholder={`Search ${filteredSvgs.length} logos...`}
placeholder={`Search ${filteredSvgs.length} ${category} logos...`}
/>
<Grid>
{#each filteredSvgs as svg}

View File

@ -17,6 +17,7 @@ export const load = (async ({ params }) => {
return {
props: {
category: slug,
svgs: svgsByCategory
}
};