scaffold festival drink tracker (pnpm workspace, Fastify + SQLite, Preact tablet UI, admin)
This commit is contained in:
parent
cf33e6ea04
commit
e0898bea22
34 changed files with 5446 additions and 0 deletions
23
client/src/tablet/BarPicker.tsx
Normal file
23
client/src/tablet/BarPicker.tsx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import type { Bar } from '@wutzcalc/shared';
|
||||
|
||||
interface Props {
|
||||
bars: Bar[] | null;
|
||||
onPick: (id: number) => void;
|
||||
}
|
||||
|
||||
export function BarPicker({ bars, onPick }: Props) {
|
||||
return (
|
||||
<div class="bar-picker">
|
||||
<h1>Bar auswählen</h1>
|
||||
{bars == null ? (
|
||||
<p>Lade…</p>
|
||||
) : (
|
||||
bars.map(b => (
|
||||
<button key={b.id} onClick={() => onPick(b.id)}>
|
||||
{b.name}
|
||||
</button>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue