File tree Expand file tree Collapse file tree 5 files changed +6
-4
lines changed
Expand file tree Collapse file tree 5 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 2424 "postcss" : " ^8.4.32" ,
2525 "prettier" : " ^3.2.5" ,
2626 "prettier-plugin-svelte" : " ^3.1.2" ,
27- "svelte" : " ^5.33 .1" ,
27+ "svelte" : " ^5.38 .1" ,
2828 "svelte-check" : " ^3.6.2" ,
2929 "svelte-preprocess" : " ^5.1.3" ,
3030 "tailwindcss" : " ^3.4.1" ,
Original file line number Diff line number Diff line change 3232 <div class =" bg-zinc-600 min-h-[32px] rounded-b" >
3333 {#if recipe .metadata .tags }
3434 <div class =" flex gap-2 p-1 flex-wrap" >
35- {#each recipe .metadata .tags as name }
36- <Tag {category } { name } />
35+ {#each recipe .metadata .tags as tag }
36+ <Tag {category } name ={ tag } />
3737 {/each }
3838 </div >
3939 {/if }
Original file line number Diff line number Diff line change @@ -43,4 +43,5 @@ export type RecipeMetadata = {
4343export type Recipe = {
4444 metadata : RecipeMetadata
4545 content : string
46+ slug : string
4647}
Original file line number Diff line number Diff line change 11import { base } from "$app/paths" ;
2+ import type { Recipe } from "src/models/RecipeMetadata"
23export async function load ( { fetch, params } ) {
34 const slug = params . slug ;
4- const recipes = await fetch ( `${ base } /category/${ slug } .json` ) . then ( ( r ) => r . json ( ) ) ;
5+ const recipes : Recipe [ ] = await fetch ( `${ base } /category/${ slug } .json` ) . then ( ( r ) => r . json ( ) ) ;
56 return { recipes, slug } ;
67}
You can’t perform that action at this time.
0 commit comments