fix: LoraManager UI not returning a component

This commit is contained in:
blessedcoolant
2023-04-01 00:17:22 +13:00
parent 274d6238fa
commit a8b9458de2

View File

@@ -69,14 +69,21 @@ export default function LoraManager() {
}
}, [foundLoras, loraItems, dispatch, prompt, handleLora, renderLoraOption]);
return (
foundLoras &&
foundLoras?.length > 0 && (
<IAISimpleMenu
menuItems={loraItems}
menuType="regular"
buttonText={t('modelManager.addLora')}
/>
)
return foundLoras && foundLoras?.length > 0 ? (
<IAISimpleMenu
menuItems={loraItems}
menuType="regular"
buttonText={t('modelManager.addLora')}
/>
) : (
<Box
background="var(--btn-base-color)"
padding={2}
textAlign="center"
borderRadius={4}
fontWeight="bold"
>
No Loras Found
</Box>
);
}