mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-27 10:50:10 +03:00
B #~: Add missing changes to files tab (#2463)
(cherry picked from commit dd9620f92e62ce21a48cf2c9e52b521cbdbb0dd4)
This commit is contained in:
parent
726a6a8547
commit
72b7753650
@ -32,7 +32,7 @@ const getTabComponent = (tabName) =>
|
||||
|
||||
const FileTabs = memo(({ id }) => {
|
||||
const { view, getResourceView } = useViews()
|
||||
const { isLoading, isError, error, status } = useGetImageQuery({ id })
|
||||
const { isError, error, status, data } = useGetImageQuery({ id })
|
||||
|
||||
const tabsAvailable = useMemo(() => {
|
||||
const resource = RESOURCE_NAMES.IMAGE
|
||||
@ -48,14 +48,12 @@ const FileTabs = memo(({ id }) => {
|
||||
</Alert>
|
||||
)
|
||||
}
|
||||
if (isLoading || status === 'pending') {
|
||||
return <LinearProgress color="secondary" sx={{ width: '100%' }} />
|
||||
}
|
||||
if (status === 'fulfilled') {
|
||||
|
||||
if (status === 'fulfilled' || id === data?.ID) {
|
||||
return <Tabs addBorder tabs={tabsAvailable ?? []} />
|
||||
}
|
||||
|
||||
return <></>
|
||||
return <LinearProgress color="secondary" sx={{ width: '100%' }} />
|
||||
})
|
||||
FileTabs.propTypes = { id: PropTypes.string.isRequired }
|
||||
FileTabs.displayName = 'FileTabs'
|
||||
|
Loading…
x
Reference in New Issue
Block a user