Skip to content

Commit efe788b

Browse files
committed
upgrade svelte to fix weird rendering hydration issue
1 parent 326eab8 commit efe788b

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

bun.lockb

1.42 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
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",

src/components/Recipe.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
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}

src/models/RecipeMetadata.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ export type RecipeMetadata = {
4343
export type Recipe = {
4444
metadata: RecipeMetadata
4545
content: string
46+
slug: string
4647
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { base } from "$app/paths";
2+
import type { Recipe } from "src/models/RecipeMetadata"
23
export 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
}

0 commit comments

Comments
 (0)