feat: implement meal planning feature with CRUD operations and UI integration

This commit is contained in:
Nils-Johan Gynther
2026-04-16 19:37:09 +02:00
parent 8b12df4aa4
commit 1b82b02021
13 changed files with 468 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
import { fetchJson } from '../../../lib/api';
import type { Recipe } from '../../../features/inventory/types';
import Navigation from '../../Navigation';
import MealPlanClient from './MealPlanClient';
export default async function MealPlanPage() {
const recipes = await fetchJson<Recipe[]>('/api/recipes').catch(() => [] as Recipe[]);
return (
<main style={{ padding: '1rem', maxWidth: '900px', margin: '0 auto' }}>
<Navigation />
<h1 style={{ marginBottom: '0.25rem' }}>Matplanering</h1>
<p style={{ color: '#666', marginBottom: '1.5rem' }}>
Välj ett recept per dag se en samlad ingredienslista i slutet.
</p>
<MealPlanClient recipes={recipes} />
</main>
);
}