feat(ui): only show modellistitem when none in array

This commit is contained in:
psychedelicious 2023-07-14 19:46:18 +10:00
parent 0b2f0c05b2
commit 56d209842f

View File

@ -79,7 +79,8 @@ const ModelList = (props: ModelListProps) => {
</IAIButton>
</ButtonGroup>
{['all', 'diffusers'].includes(modelFormatFilter) && (
{['all', 'diffusers'].includes(modelFormatFilter) &&
filteredDiffusersModels.length > 0 && (
<Flex sx={{ gap: 2, flexDir: 'column' }}>
<Text variant="subtext" size="sm">
Diffusers
@ -94,7 +95,8 @@ const ModelList = (props: ModelListProps) => {
))}
</Flex>
)}
{['all', 'checkpoint'].includes(modelFormatFilter) && (
{['all', 'checkpoint'].includes(modelFormatFilter) &&
filteredCheckpointModels.length > 0 && (
<Flex sx={{ gap: 2, flexDir: 'column' }}>
<Text variant="subtext" size="sm">
Checkpoint