// Komida onboarding – full flow built on the N1 welcome (card on sand). // Flow: Welcome (N1) → Household → Week menu → Start Premium (Vipps) const Sc='#F2ECE2', CDc='#FBF8F3', PLc='#5A2D39', PDc='#41222B', INc='#36302E', MUc='rgba(54,48,46,0.6)'; const VIPPS='#FF5B24'; const HEROc='https://images.matprat.no/ue7xp4r8qh-normal/710/og.png'; function ArrC({ c='#fff', s=20 }) { return ; } function ApC({ s=30, c='#fff' }) { return ; } function LogoC({ c=PLc, s=20 }) { const onDark = c==='#fff'; return ( komida ); } function LogoW({ s=15 }) { return ; } function DotC({ i=0, n=4, light }) { return
{Array.from({length:n}).map((_,k)=>
)}
; } function Check({ s=16, c='#fff' }) { return ; } // segmentert progress-bar øvst (delt over stepsa) function SegBar({ i=0, n=3, light }) { const on = light ? '#fff' : PLc; const off = light ? 'rgba(255,255,255,0.28)' : 'rgba(90,45,57,0.18)'; return (
{Array.from({length:n}).map((_,k)=>(
{k===i &&
}
))}
); } function Prim({ children, onClick, bg=PLc, fg='#fff' }) { return ; } function BackBtn({ onClick, light }) { return ; } // ── Screen 0: Splash function S0({ next }) { return (
komida
); } // ── Step 1: Welcome (photo mosaic + fade, burgundy CTA) function S1({ next, login }) { const GRID = [ 'assets/food-galette.png', 'assets/food-kylling.png', 'assets/food-smoothie.png', 'assets/food-linsesuppe.png', 'assets/food-brownie.png', 'assets/fiskegrateng.png', 'assets/food-linsegryte.png', 'https://images.unsplash.com/photo-1512621776951-a57141f2eefd?w=400&q=70', 'https://images.unsplash.com/photo-1547592180-85f173990554?w=400&q=70', 'assets/food-galette.png', 'https://images.unsplash.com/photo-1546069901-ba9599a7e63c?w=400&q=70', 'https://images.unsplash.com/photo-1512058564366-18510be2db19?w=400&q=70', 'https://images.unsplash.com/photo-1505252585461-04db1eb84625?w=400&q=70', 'https://images.unsplash.com/photo-1606313564200-e75d5e30476c?w=400&q=70', ]; return (
komida
Dinner
made easy
Save time and money with ready-made menus and easy recipes.
); } // ── Step 2: Who are we cooking for? function S2({ next, back }) { const [adults, setAdults] = React.useState(2); const [kids, setKids] = React.useState(1); const Stepper = ({ label, sub, val, set }) => (
{label}
{sub}
{val}
); return (
How many are you
around the table?
We tailor recipes and portions to your household.
Next step
); } // ── Step 3: How many dinners a week? function S3({ next, back }) { const [days, setDays] = React.useState(5); return (
How many dinners
a week?
We only plan the days you want to cook at home.
{[2,3,4,5,6,7].map(n=>{ const on = n===days; return ( ); })}
{days} dinners planned each week
Continue
); } // ── Step 4: Start Premium (Vipps) function S4({ back, done }) { const perks = ['Unlimited weekly menus','Automatic shopping list','Step-by-step cooking mode','Tailored to your household']; return (
Komida Premium
Start Premium
Try free for 7 days. Then 49 kr/mo. Cancel anytime.
{perks.map(p=>(
{p}
))}
); } // ── Login-skjerm: Face ID / Apple / e-post function SLogin({ back }) { const Btn = ({ icon, label }) => ( ); return (
Log in
}/>
Forgot your login method or password?
); } // ── Step 4: Taster – your first weekly menu function S5({ next, back }) { const meals = [ { day:'Monday', title:'Homemade fish gratin', time:'45 min', diff:'Easy', img:'assets/fiskegrateng.png' }, { day:'Tuesday', title:'Tomato soup with egg', time:'25 min', diff:'Easy', img:'https://images.unsplash.com/photo-1547592180-85f173990554?w=400&q=70' }, { day:'Wednesday', title:'Coconut chicken stew', time:'40 min', diff:'Medium', img:'assets/food-kylling.png' }, { day:'Thursday', title:'Lentil stew with spinach', time:'30 min', diff:'Easy', img:'assets/food-linsegryte.png' }, { day:'Friday', title:'Green galette', time:'50 min', diff:'Medium', img:'assets/food-galette.png' }, ]; const DiffIcon = ({ diff, c }) => { const frac = diff === 'Advanced' ? 1 : diff === 'Medium' ? 0.5 : 0.28; const h = frac * 12.8, y = 18.4 - h; const id = 's5clip'+diff; return ( ); }; const ClockIcon = ({ c }) => ( ); return (
Here is your first
weekly menu
Tailored to your household. You can swap anything later.
{/* whole week, lower cards fade behind the sand mask */}
{meals.map((m,i)=>(
{m.day}
{m.title}
{m.diff} {m.time}
))}
{/* fade hiding the rest of the week */}
See the whole week
); } // ── Step 4: Create account function S6({ back, done }) { const Btn = ({ icon, label }) => ( ); const Consent = ({ on, set, children }) => null; return (
Create account
Already have an account? Log in
}/>
By creating an account you agree to our terms and privacy policy.
); } // ── Apple Sign In – authentic system sheet with Face ID states function SFaceID({ back, done }) { const [phase, setPhase] = React.useState(0); // 0 idle · 1 signing · 2 done const BLUE = '#0A84FF'; const go = () => { setPhase(1); setTimeout(()=>setPhase(2), 1400); setTimeout(()=>done && done(), 2600); }; return ( {/* bakgrunnsskjermen (opprett konto), dimma */}
Create account
Already have an account? Log in
{['Continue with Apple'].map(t=>(
{t}
))}
{/* Apple system-ark */}
{/* tittelrad */}
Sign in with Apple
{/* app-ikon */}
k
Sign in to Komida using your
Apple Account.
{/* konto-rad */}
Kristoffer Engebø
Your account
{/* action-område: Sign in → Face ID → Done */}
{phase===0 && ( )} {phase===1 && (
Signing in…
)} {phase===2 && (
Done
)}
); } // ── Lastar-skjerm etter innlogging function SLoading() { return (
k
Building your weekly menu…
); } // ── Subscription: teikn abonnement for å starte function SSubscribe({ done }) { return (
{/* foto: ein of rettane */}
Choose a plan
to get started
Visit the Komida website to get started with your first weekly menu!*
{['New weekly menus and recipes all the time','No commitment – cancel anytime'].map(t=>(
{t}
))}
*Subscriptions cannot be managed in the app.
); } // ── Home after onboarding: locked until subscribed function SHome({ name, web, subbed, onNav }) { const meals = [ { day:'Monday', date:'14 Apr', title:'Homemade fish gratin', time:'45 min', diff:'Easy', img:'assets/fiskegrateng.png' }, { day:'Tuesday', date:'15 Apr', title:'Tomato soup with egg', time:'Under 25 min', diff:'Easy', img:'https://images.unsplash.com/photo-1547592180-85f173990554?w=400&q=70' }, { day:'Wednesday', date:'16 Apr', title:'Coconut chicken stew', time:'40 min', diff:'Medium', img:'assets/food-kylling.png' }, { day:'Thursday', date:'17 Apr', title:'Lentil stew with spinach', time:'Under 30 min', diff:'Easy', img:'assets/food-linsegryte.png' }, { day:'Friday', date:'18 Apr', title:'Green galette', time:'50 min', diff:'Medium', img:'assets/food-galette.png' }, ]; const DiffIcon = ({ diff, c }) => { const frac = diff === 'Advanced' ? 1 : diff === 'Medium' ? 0.5 : 0.28; const h = frac * 12.8, y = 18.4 - h; const id = 'clip'+diff; return ( ); }; const ClockIcon = ({ c }) => ( ); return (
{/* helsing */}
Good evening, Ana
Weekly plan
14–18 April
{/* locked weekly menu behind fade */}
{meals.map((m,i)=>(
{m.day}
{m.title}
{m.diff} {m.time}
))}
{/* låse-kort – berre før abonnement */} {!subbed && (
Just one small step left!
Your weekly menu is ready. Start your subscription on Komida's website to get going.
)} ); } // ── My account / profil function SProfile({ edit, name, photo, subbed, plan={}, onNav }) { const Row = ({ icon, label }) => (
{icon} {label} {subbed ? : }
); return (
{/* topprad */}
You
{/* profil */}
{photo ? : }
{name || 'Hi!'}
{/* menyrader */}
}/> }/> }/>
{/* abonnement-varsel */}
subbed && onNav && onNav('sub')}>
{subbed ? : }
{subbed ? <>{plan.name || 'Family'} is active · {plan.price || '89'} kr/mo. Next payment 05.08.2026. : <>Create a subscription on Komida's website – and you are good to go!}
); } // ── Edit profile (ark over My profile) function SEditProfile({ close, onSave, name='', photo=null }) { const [first, setFirst] = React.useState(name.split(' ')[0] || ''); const [last, setLast] = React.useState(name.split(' ').slice(1).join(' ') || ''); const [pic, setPic] = React.useState(photo); const [sheet, setSheet] = React.useState(false); const filled = first.trim().length > 0; const fieldRow = (label, ph, val, set) => (
{label}
set(e.target.value)} placeholder={ph} style={{ width:'100%', height:52, borderRadius:14, padding:'0 16px', border:'1.5px solid rgba(90,45,57,0.22)', background:'#fff', outline:'none', fontFamily:'Manrope', fontSize:15.5, color:PDc }}/>
); return ( {/* dimma profilskjerm bak */}
Hi!
{/* ark */}
Edit profile
{/* avatar + add photo */}
{pic ? : }
{fieldRow('First name', 'Enter your first name', first, setFirst)} {fieldRow('Last name', 'Enter your last name', last, setLast)}
{/* iOS action sheet – Add photo */} {sheet && ( <>
setSheet(false)} style={{ position:'absolute', inset:0, background:'rgba(20,14,16,0.3)', zIndex:30 }}/>
)} ); } // ── komida.no in Safari – choose a plan function SWeb({ back, choose }) { const plans = [ { name:'Basic', price:'49', per:'kr/mo', sub:'For cooking for one or two', perks:['Weekly menu for up to 2 people','Automatic shopping list','Step-by-step cooking mode'], hi:false }, { name:'Family', price:'89', per:'kr/mo', sub:'Tailored to the whole household, kids included', perks:['Weekly menu for up to 6 people','Automatic shopping list','Kid-friendly suggestions','Share the plan with your family'], hi:true }, { name:'Yearly', price:'790', per:'kr/yr', sub:'The Family plan with two months free', perks:['Everything in Family','Save 278 kr a year','Price guarantee for 12 months'], hi:false }, ]; return (
{/* Safari-adresselinje */}
komida.no
{/* innhald */}
Choose your plan
Try free for 7 days. Cancel anytime.
{plans.map(p=>(
{p.hi && (
Most popular
)}
{p.name} {p.price} {p.per}
{p.sub}
{p.perks.map(t=>(
{t}
))}
))}
{/* Safari-verktøylinje */}
{[ 'M15 4l-7 8 7 8', 'M9 4l7 8-7 8', 'M12 16V4M7.5 8.5L12 4l4.5 4.5M5 20h14', 'M4 5h16v12H4zM8 20h8', 'M4 6h7v6H4zM13 6h7v6h-7zM4 14h7v6H4zM13 14h7v6h-7z', ].map((d,i)=>( ))}
); } // ── komida.no – opprett konto (etter valt plan) function SWebSignup({ back, plan='Family', price='89', appleLogin }) { const [mail, setMail] = React.useState(''); const [pw, setPw] = React.useState(''); const [c1, setC1] = React.useState(true); const [c2, setC2] = React.useState(false); const OAuth = ({ icon, label }) => ( ); const Cb = ({ on, set, children }) => (
set(!on)} style={{ display:'flex', gap:11, padding:'12px 13px', borderRadius:12, cursor:'pointer', border:`1.5px solid ${on?PLc:'rgba(90,45,57,0.18)'}`, background: on?'rgba(90,45,57,0.04)':'transparent', alignItems:'flex-start' }}>
{on && }
{children}
); return (
{/* burgundy website header */}
Create
an account
{/* valt plan */}
{plan}
The whole household New menu every week
0 kr for the first 7 days
{price} kr /month after that
The trial applies to new customers. After 7 days the subscription automatically continues at {price} kr per month. Cancel anytime.
Already have an account? Log in
OR MANUALLY
Email
setMail(e.target.value)} style={{ width:'100%', height:46, borderRadius:12, padding:'0 14px', outline:'none', border:'1.5px solid rgba(90,45,57,0.25)', background:'#fff', fontFamily:'Manrope', fontSize:15, color:PDc }}/>
Password
setPw(e.target.value)} style={{ width:'100%', height:46, borderRadius:12, padding:'0 44px 0 14px', outline:'none', border:'1.5px solid rgba(90,45,57,0.25)', background:'#fff', fontFamily:'Manrope', fontSize:15, color:PDc }}/>
Must be at least 8 characters
I would like to receive emails from Komida with personal suggestions, news and offers. Share my sign-up data with marketing partners for more relevant ads.
By clicking Create account you agree to Komida's terms and privacy policy.
{/* Safari-verktøylinje */}
{['M9 4l7 8-7 8','M12 16V4M7.5 8.5L12 4l4.5 4.5M5 20h14','M4 5h16v12H4zM8 20h8','M4 6h7v6H4zM13 6h7v6h-7zM4 14h7v6H4zM13 14h7v6h-7z'].map((d,i)=>( ))}
); } // ── checkout.komida.no – betalingsval function SWebPay({ back, pay, plan='Family', price='89' }) { const [sel, setSel] = React.useState('apple'); const Method = ({ id, label, logo }) => { const on = sel === id; return (
setSel(id)} style={{ display:'flex', alignItems:'center', gap:12, cursor:'pointer', padding: on?'10px 14px':'12px 2px', borderRadius:999, border: on?`2px solid ${PDc}`:'none', marginTop:on?2:0 }}>
{on &&
}
{label} {logo}
{on && (
Get started today with a free 7-day trial. When the trial ends, the subscription renews automatically at {price} kr every 30 days. You can cancel at any time.
By clicking the purchase button you accept our terms of use.
)}
); }; return (
Checkout
{plan}
0 kr for 7 days · then {price} kr /month
Pay with…
All transactions are secure and encrypted.
Pay }/>
{['M9 4l7 8-7 8','M12 16V4M7.5 8.5L12 4l4.5 4.5M5 20h14','M4 5h16v12H4zM8 20h8','M4 6h7v6H4zM13 6h7v6h-7zM4 14h7v6H4zM13 14h7v6h-7z'].map((d,i)=>( ))}
); } // ── Apple Pay-ark: dobbelttrykk sideknapp function SApplePay({ back, done }) { return (
{/* dimma checkout bak */}
Pay with…
Get started today with a free 7-day trial. When the trial ends, the subscription renews automatically.
{/* Double-Click to Pay hint */}
Double-Click
to Pay
{/* Apple Pay-ark */}
Pay
SPV Bankkort •••• 4494
Change Payment Method
Pay Komida AS
NOK 0,00
); } // ── Kvittering etter betaling function SWebDone({ toApp, plan='Family', price='89', menu }) { return (
Your weekly
menu is ready
k
{plan}
The whole household
{[['Total','0 kr'],['Payment method','Apple Pay'],['Next payment',`${price} kr`],['Payment date','05.08.2026']].map(([k,v],i)=>(
{k}
{v}
))}
Next payment is 05.08.2026. You can cancel at any time.
Head back to the Komida app – everything is synced and ready.
{['M15 4l-7 8 7 8','M9 4l7 8-7 8','M12 16V4M7.5 8.5L12 4l4.5 4.5M5 20h14','M4 5h16v12H4zM8 20h8','M4 6h7v6H4zM13 6h7v6h-7zM4 14h7v6H4zM13 14h7v6h-7z'].map((d,i)=>( ))}
); } // ── delt botn-nav function AppNav({ active='plan', onNav, dim }) { const Ico = ({ name, color }) => { if (name==='plan') return ; if (name==='list') return ; if (name==='chef') return ( ); if (name==='book') return ; return ; }; return (
{[['plan','Planner'],['list','Shopping'],['chef','Assistant'],['book','Collection'],['user','You']].map(([k,lb])=>{ const on = active===k; const col = on ? PLc : (dim ? 'rgba(54,48,46,0.42)' : 'rgba(54,48,46,0.55)'); return (
onNav && onNav(k)} style={{ display:'flex', flexDirection:'column', alignItems:'center', gap:2, cursor:'pointer', padding: on?'6px 15px':'6px 11px', borderRadius:999, background: on?'rgba(90,45,57,0.09)':'transparent', color:col, fontSize:10.5, fontWeight: on?700:500, whiteSpace:'nowrap' }}> {lb}
); })}
); } // ── Shopping list function SShopping({ onNav }) { const [checked, setChecked] = React.useState({}); const groups = [ { cat:'Fruit and vegetables', items:[['Onion','2 pcs'],['Garlic','1 clove'],['Spinach','200 g'],['Tomato','4 pcs'],['Lemon','1 pc']] }, { cat:'Meat and fish', items:[['Chicken breast','600 g'],['Cod fillet','500 g']] }, { cat:'Dairy', items:[['Heavy cream','3 dl'],['Butter','100 g'],['Eggs','6 pcs']] }, { cat:'Pantry', items:[['Red lentils','200 g'],['Macaroni','300 g'],['Coconut milk','1 can']] }, ]; const total = groups.reduce((n,g)=>n+g.items.length,0); const doneN = Object.values(checked).filter(Boolean).length; return (
Week 16
Shopping list
{doneN}/{total}
{/* framdrift */}
{groups.map(g=>(
{g.cat}
{g.items.map(([n,a],i)=>{ const key = g.cat+n, on = !!checked[key]; return (
setChecked(c=>({ ...c, [key]:!c[key] }))} style={{ display:'flex', alignItems:'center', gap:13, padding:'13px 15px', cursor:'pointer', borderBottom: i
{on && }
{n} {a}
); })}
))}
); } // ── Assistant function SAssistant({ onNav, cook }) { const meals = [ { day:'Today', title:'Coconut chicken stew', time:'40 min', diff:'Medium', img:'assets/food-kylling.png' }, { day:'Thursday', title:'Lentil stew with spinach', time:'30 min', diff:'Easy', img:'assets/food-linsegryte.png' }, { day:'Friday', title:'Green galette', time:'50 min', diff:'Medium', img:'assets/food-galette.png' }, ]; return (
Ready to cook?
Assistant
{/* dagens rett – hero */}
TODAY
Coconut chicken stew
Medium · 40 min · 8 steps
Start
Later this week
{meals.slice(1).map((m,i)=>(
{m.day}
{m.title}
{m.diff} · {m.time}
))}
); } // ── Website menu (signed in) function SWebMenu({ close, account }) { const items = ['Recipes','Weekly menus','Categories','About Komida','Buy a gift card']; return (
{items.map(t=>(
{t}
))}
My account
Log out
Search
Search for a dish or ingredient
); } // ── Website: My account (signed in) function SWebAccount({ menu, manage, plan={} }) { const Grp = ({ title, rows }) => (
{title}
{rows.map(([icon,label],i)=>(
{icon} {label}
))}
); const ic = (d, fill) => ; return (
{/* mørk topp */}
Welcome, Kristoffer!
dr5dp9v5bm@privaterelay.appleid.com
k
{plan.name||'Family'} – {plan.price||'89'} kr
Next payment 05.08.2026
{['M15 4l-7 8 7 8','M9 4l7 8-7 8','M12 16V4M7.5 8.5L12 4l4.5 4.5M5 20h14','M4 5h16v12H4zM8 20h8','M4 6h7v6H4zM13 6h7v6h-7zM4 14h7v6H4zM13 14h7v6h-7z'].map((d,i)=>( ))}
); } // ── App: abonnementsinnstillingar function SSubSettings({ back, onNav, open, plan={} }) { return (
Subscription
{[['Your subscription', plan.name||'Family'],['Next payment', `${plan.price||'89'} kr · 05.08.2026`]].map(([t,sub],i)=>(
{t}
{sub}
))}
Renewal
The subscription renews automatically on 05.08.2026. You can cancel at any time.
Subscriptions cannot be managed in the app. Go to Komida's website to change or cancel.
); } // ── Recipe (frå Assistant) function SRecipe({ back, start, onNav, meal }) { const m = meal || { title:'Tomato soup with egg', time:'30 min', diff:'Easy', img:'https://images.unsplash.com/photo-1547592180-85f173990554?w=800&q=75' }; const [tab, setTab] = React.useState('detaljer'); const stats = [ ['M12 7.5V12l3 2M12 21a9 9 0 100-18 9 9 0 000 18z', '15 min', 'Prep'], ['M4 18h16M6 18V9a6 6 0 0112 0v9M12 3v-1', '30 min', 'Cook time'], ['M12 3c1.5 3 4 4 4 7a4 4 0 11-8 0c0-1.5.8-2.6 1.5-3.5', '320', 'Calories'], ['M7 12h10M9 8h6M9 16h6M12 3a9 9 0 100 18 9 9 0 000-18z', '40 g', 'Protein'], ]; const ingredients = [['Tomato','8 pcs'],['Eggs','4 pcs'],['Onion','1'],['Garlic','2 cloves'], ['Heavy cream','2 dl'],['Basil','1 pot'],['Vegetable stock','1 cube']]; const equipment = ['Large pot','Immersion blender','Cutting board','Knife']; return (
{/* foto */}
{/* kort som overlappar fotoet */}
{m.title}
{/* faner */}
{[['detaljer','Details'],['ingr','Ingredients'],['utstyr','Equipment']].map(([k,l])=>(
setTab(k)} style={{ flex:1, textAlign:'center', padding:'8px 0', borderRadius:999, cursor:'pointer', background: tab===k?'#fff':'transparent', fontSize:12.5, fontWeight: tab===k?700:600, color: tab===k?PDc:MUc, boxShadow: tab===k?'0 1px 4px rgba(60,30,38,0.12)':'none' }}>{l}
))}
{tab==='detaljer' && ( <>
{stats.map(([d,v,l])=>(
{v}
{l}
))}
Description
A rich and flavourful homemade tomato soup made from scratch with sun-ripened tomatoes, onion and aromatic spices. Served with a boiled egg for extra staying power.
)} {tab==='ingr' && (
{ingredients.map(([n,a])=>(
{n} {a}
))}
)} {tab==='utstyr' && (
{equipment.map(e=>( {e} ))}
)}
); } // ── Kokemodus function SCook({ back, done, meal }) { const m = meal || { title:'Coconut chicken stew', img:'assets/food-kylling.png' }; const [i, setI] = React.useState(1); const [open, setOpen] = React.useState(false); const SP = [ { name:'Red curry paste', amt:'2 ss', c1:'#8a3a1e', c2:'#4d1d0c' }, { name:'Cumin', amt:'1 ts', c1:'#a45e2a', c2:'#6b3a18' }, { name:'Turmeric', amt:'½ ts', c1:'#e4a017', c2:'#a56a08' }, { name:'Chilli flakes', amt:'¼ ts', c1:'#c83024', c2:'#7c1912' }, ]; const nn = (typeof window !== 'undefined' && window.KLANG === 'nn'); const steps = [ { stage: nn?'Førebuing':'Prep', title: nn?'Skjer kyllingen i bitar':'Cut the chicken into pieces', img:'assets/food-kylling.png' }, { stage: nn?'Førebuing':'Prep', title: nn?'Finkutt 1 stor løk':'Finely chop 1 large onion', img:'assets/step-onion.jpg' }, { stage: nn?'Steiking':'Frying', title: nn?'Ha alle krydderne i panna':'Add all the spices to the pan', img:'assets/food-galette.png', subs:SP }, { stage: nn?'Småkoking':'Simmering', title: nn?'Hell i kokosmjølk og la det småkoke':'Pour in coconut milk and let it simmer', img:'assets/food-linsesuppe.png' }, { stage: nn?'Servering':'Serving', title: nn?'Vend inn spinat og server med ris':'Fold in spinach and serve with rice', img:'assets/food-kylling.png' }, ]; const st = steps[i]; const HALO = '0 1px 2px rgba(0,0,0,0.55), 0 2px 12px rgba(0,0,0,0.5), 0 4px 26px rgba(0,0,0,0.45)'; const Dot = ({ s, size=24 }) => ( ); return (
{/* foto kant til kant */}
{/* sand-ark nedanfrå */}
{/* tekst under fotoet */}
{st.stage} · {nn?'Steg':'Step'} {i+1} {nn?'av':'of'} {steps.length}
{st.title}
{st.subs && (
{open && (
{st.subs.map(s=>(
{s.name} {s.amt}
))}
)}
)}
); } function Flow() { const [s, setS] = React.useState(0); const [name, setName] = React.useState(''); const [photo, setPhoto] = React.useState(null); const [plan, setPlan] = React.useState({ name:'Family', price:'89' }); const [subbed, setSubbed] = React.useState(false); const nav = k=>setS(k==='plan'?8 : k==='list'?17 : k==='chef'?18 : k==='book'?24 : k==='sub'?21 : 9); const scr = [ setS(1)}/>, setS(2)} login={()=>setS(5)}/>, setS(3)} back={()=>setS(1)}/>, setS(4)} back={()=>setS(2)}/>, setS(3)} done={()=>setS(6)}/>, setS(1)}/>, setS(4)} done={()=>setS(7)}/>, setS(8)}/>, setS(9)} web={()=>setS(11)} subbed={subbed} onNav={nav}/>, setS(10)} home={()=>setS(8)} subbed={subbed} plan={plan} onNav={nav}/>, { setName(n); setPhoto(p); setS(9); }} close={()=>setS(9)}/>, setS(8)} choose={(n,p)=>{ setPlan({ name:n, price:p }); setS(12); }}/>, setS(11)} plan={plan.name} price={plan.price} appleLogin={()=>setS(13)}/>, setS(12)} done={()=>setS(14)}/>, setS(12)} pay={()=>setS(15)} plan={plan.name} price={plan.price}/>, setS(14)} done={()=>{ setSubbed(true); setS(16); }}/>, setS(8)} plan={plan.name} price={plan.price} menu={()=>setS(19)}/>, , setS(22)}/>, setS(16)} account={()=>setS(20)}/>, setS(19)} manage={()=>setS(21)} plan={plan}/>, setS(9)} open={()=>{}} plan={plan} onNav={nav}/>, setS(18)} start={()=>setS(23)} onNav={nav}/>, setS(22)} done={()=>setS(18)}/>, setS(22)} add={()=>setS(25)}/>, setS(24)} url={()=>setS(26)} manual={()=>setS(28)}/>, setS(25)} next={()=>setS(27)}/>, setS(26)} save={()=>setS(24)} prefilled/>, setS(25)} save={()=>setS(24)}/>, ]; return scr[s]; } Object.assign(window, { Flow, S0, S1, S2, S5, S6, SLogin, SFaceID, SSubscribe, SLoading, SHome, SProfile, SEditProfile, SWeb, SWebSignup, SWebPay, SApplePay, SWebDone, AppNav, SShopping, SAssistant, SWebMenu, SWebAccount, SSubSettings, SRecipe, SCook });