Oprava výběru možnosti stravování
All checks were successful
ci/woodpecker/push/workflow Pipeline was successful

This commit is contained in:
Martin Berka 2025-03-06 08:03:49 +01:00
parent c9fa710070
commit f74ec379c8

View File

@ -437,9 +437,9 @@ function App() {
<p>{`Jak to ${dayIndex == null || dayIndex === data.todayDayIndex ? 'dnes' : 'tento den'} vidíš s obědem?`}</p> <p>{`Jak to ${dayIndex == null || dayIndex === data.todayDayIndex ? 'dnes' : 'tento den'} vidíš s obědem?`}</p>
<Form.Select ref={choiceRef} onChange={doAddChoice}> <Form.Select ref={choiceRef} onChange={doAddChoice}>
<option></option> <option></option>
{Object.keys(Restaurant) {Object.entries(LunchChoice)
.filter(entry => { .filter(entry => {
const locationKey = entry as keyof typeof Restaurant; const locationKey = entry[0] as keyof typeof Restaurant;
return !food[locationKey]?.closed; return !food[locationKey]?.closed;
}) })
.map(entry => <option key={entry[0]} value={entry[0]}>{entry[1]}</option>)} .map(entry => <option key={entry[0]} value={entry[0]}>{entry[1]}</option>)}