1
0
Fork 0

chore(shared): Changes for recent core changes

This commit is contained in:
joostdecock 2022-09-25 10:45:52 +02:00
parent f31a158398
commit 31a28d2faa
16 changed files with 56 additions and 58 deletions

View file

@ -96,17 +96,12 @@ const StoreLogs = ({ logs, units }) => (
</div>
)
const Logs = (props) =>
props.draft.stores.length === 1 ? (
<StoreLogs logs={props.draft.stores[0].logs} units={props.gist.units} />
) : (
<Tabs tabs={props.draft.stores.map((store, i) => `Set ${i}`).join(',')}>
{props.draft.stores.map((store, i) => (
<Tab key={i}>
<StoreLogs logs={store.logs} units={props.gist.units} />
</Tab>
))}
</Tabs>
)
const Logs = (props) => (
<Tabs tabs={['Pattern', ...props.draft.setStores.map((store, i) => `Set ${i}`)].join(',')}>
{[props.draft.store, ...props.draft.setStores].map((store, i) => (
<Tab key={i}><StoreLogs logs={store.logs} units={props.gist.units} /></Tab>
))}
</Tabs>
)
export default Logs