fix(ui): do not disable the metadata and workflow tabs in viewer

Disabling these introduces an issue where, if you were on an image with a workflow/metadata, then switch to one without, you can end up on a disabled tab. This could potentially cause a runtime error.
This commit is contained in:
psychedelicious 2023-12-06 18:07:45 +11:00
parent fd8d1e13a0
commit 3423b5848f

View File

@ -63,12 +63,13 @@ const ImageMetadataViewer = ({ image }: ImageMetadataViewerProps) => {
w: 'full',
h: 'full',
}}
isLazy={true}
>
<TabList>
<Tab>{t('metadata.recallParameters')}</Tab>
<Tab isDisabled={!metadata}>{t('metadata.metadata')}</Tab>
<Tab>{t('metadata.metadata')}</Tab>
<Tab>{t('metadata.imageDetails')}</Tab>
<Tab isDisabled={!image.has_workflow}>{t('metadata.workflow')}</Tab>
<Tab>{t('metadata.workflow')}</Tab>
</TabList>
<TabPanels>