mirror of
https://github.com/pheralb/svgl.git
synced 2024-11-10 14:46:54 +08:00
✨ Update dynamic route.
This commit is contained in:
parent
4b36ee02ba
commit
22adf5919e
@ -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}
|
||||
|
@ -17,6 +17,7 @@ export const load = (async ({ params }) => {
|
||||
|
||||
return {
|
||||
props: {
|
||||
category: slug,
|
||||
svgs: svgsByCategory
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user