fix: Tab index not being correct

This probably needs to be updated to an object over an array so the index of item in the array doesnt break the rest of it.
This commit is contained in:
blessedcoolant 2023-07-05 04:13:05 +12:00 committed by psychedelicious
parent db8862d860
commit bf895221c2
2 changed files with 6 additions and 9 deletions

View File

@ -66,16 +66,16 @@ const tabs: InvokeTabInfo[] = [
icon: <Icon as={MdDeviceHub} sx={{ boxSize: 6, pointerEvents: 'none' }} />, icon: <Icon as={MdDeviceHub} sx={{ boxSize: 6, pointerEvents: 'none' }} />,
content: <NodesTab />, content: <NodesTab />,
}, },
// {
// id: 'batch',
// icon: <Icon as={FaLayerGroup} sx={{ boxSize: 6, pointerEvents: 'none' }} />,
// content: <BatchTab />,
// },
{ {
id: 'modelManager', id: 'modelManager',
icon: <Icon as={FaCube} sx={{ boxSize: 6, pointerEvents: 'none' }} />, icon: <Icon as={FaCube} sx={{ boxSize: 6, pointerEvents: 'none' }} />,
content: <ModelManagerTab />, content: <ModelManagerTab />,
}, },
// {
// id: 'batch',
// icon: <Icon as={FaLayerGroup} sx={{ boxSize: 6, pointerEvents: 'none' }} />,
// content: <BatchTab />,
// },
]; ];
const enabledTabsSelector = createSelector( const enabledTabsSelector = createSelector(

View File

@ -1,13 +1,10 @@
export const tabMap = [ export const tabMap = [
'txt2img', 'txt2img',
'img2img', 'img2img',
// 'generate',
'unifiedCanvas', 'unifiedCanvas',
'nodes', 'nodes',
'batch',
// 'postprocessing',
// 'training',
'modelManager', 'modelManager',
'batch',
] as const; ] as const;
export type InvokeTabName = (typeof tabMap)[number]; export type InvokeTabName = (typeof tabMap)[number];