This commit is contained in:
Fre Timmerman 2021-02-04 16:17:21 +01:00
parent 8c14b16ca1
commit 5487c5cb5c
3 changed files with 16539 additions and 21 deletions

16542
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
query getStores{
stores{
id,
name
}
}

View File

@ -25,7 +25,17 @@ const StoreSelect = React.memo(({ value, onChange }: StoreSelectProps) => {
}, []);
return (
<div>Store select</div>
<Query query={queries.getStores}>
{({ data: { stores = [] } }) => (
<Select value={value} onChange={onChangeStore}>
<option key="default" value="">Select a store</option>
{stores.map(({ id, name }: Store) => {
return (<option key={id} value={id}>{name}</option>)
})}
</Select>
)}
</Query>
);
});