New import in version 0.1

This commit is contained in:
Nils-Johan Gynther
2026-04-11 15:38:24 +02:00
parent 8552c6f757
commit 5448da1b98
12 changed files with 868 additions and 7 deletions
@@ -2,6 +2,7 @@
import { useState, useEffect } from 'react';
import { useRouter } from 'next/navigation';
import Link from 'next/link';
import { fetchJson } from '../../../lib/api';
import { parseErrorResponse } from '../../../lib/error-handler';
import type { Product } from '../../../features/inventory/types';
@@ -138,7 +139,24 @@ export default function CreateRecipePage() {
return (
<main style={{ padding: '1rem', maxWidth: '1000px', margin: '0 auto' }}>
<Navigation />
<h1 style={{ marginBottom: '1rem' }}>Lägg till nytt recept</h1>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '1rem' }}>
<h1 style={{ margin: 0 }}>Lägg till nytt recept</h1>
<Link
href="/recipes/import"
style={{
padding: '0.5rem 1rem',
background: '#f0f0f0',
color: '#333',
borderRadius: '4px',
textDecoration: 'none',
fontWeight: 500,
fontSize: '0.9rem',
border: '1px solid #ddd',
}}
>
Importera från Markdown
</Link>
</div>
{error && <p style={{ color: 'crimson', backgroundColor: '#ffe5e5', padding: '0.75rem', borderRadius: '4px', marginBottom: '1rem' }}>{error}</p>}