11D recipe preview

This commit is contained in:
Nils-Johan Gynther
2026-04-09 15:12:54 +02:00
parent 8bb7b66274
commit d1870decac
6 changed files with 354 additions and 11 deletions
+15
View File
@@ -0,0 +1,15 @@
import { fetchJson } from '../../lib/api';
import type { Recipe } from '../../features/inventory/types';
import RecipePreview from './RecipePreview';
export default async function RecipesPage() {
const recipes = await fetchJson<Recipe[]>('/api/recipes');
return (
<main style={{ padding: '1.5rem', maxWidth: '1000px', margin: '0 auto' }}>
<h1>Recept</h1>
<p>Här kan du jämföra recept mot nuvarande hemmavaror.</p>
<RecipePreview recipes={recipes} />
</main>
);
}