chore(ui): knip

This commit is contained in:
psychedelicious
2025-02-20 20:14:06 +10:00
parent c8135126f2
commit d142a94b67
2 changed files with 0 additions and 63 deletions

View File

@@ -1,28 +0,0 @@
import { Text } from '@invoke-ai/ui-library';
import { useAppSelector } from 'app/store/storeHooks';
import { selectWorkflowName } from 'features/nodes/store/workflowSlice';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
export const ActiveWorkflowName = memo(() => {
const workflowName = useAppSelector(selectWorkflowName);
const { t } = useTranslation();
if (workflowName) {
return (
<Text fontWeight="semibold" fontSize="md" justifySelf="flex-start" noOfLines={1}>
{workflowName}
</Text>
);
}
// activeWorkflowName is always a string - if it is an empty string, it implies we do not have a workflow selected
return (
<Text fontSize="md" fontWeight="semibold" color="base.300" noOfLines={1}>
{t('workflows.chooseWorkflowFromLibrary')}
</Text>
);
});
ActiveWorkflowName.displayName = 'ActiveWorkflowName';

View File

@@ -1,35 +0,0 @@
import { Box, Flex } from '@invoke-ai/ui-library';
import { useStore } from '@nanostores/react';
import { $workflowCategories } from 'app/store/nanostores/workflowCategories';
import ScrollableContent from 'common/components/OverlayScrollbars/ScrollableContent';
import UploadWorkflowButton from 'features/workflowLibrary/components/UploadWorkflowButton';
import type { RefObject } from 'react';
import { memo } from 'react';
import { WorkflowList } from './WorkflowList';
import { WorkflowSearch } from './WorkflowSearch';
import { WorkflowSortControl } from './WorkflowSortControl';
export const WorkflowListMenuContent = memo(({ searchInputRef }: { searchInputRef: RefObject<HTMLInputElement> }) => {
const workflowCategories = useStore($workflowCategories);
return (
<Flex w="full" h="full" flexDir="column" gap={2}>
<Flex alignItems="center" gap={2} w="full" justifyContent="space-between">
<WorkflowSearch searchInputRef={searchInputRef} />
<WorkflowSortControl />
<UploadWorkflowButton />
</Flex>
<Box position="relative" w="full" h="full">
<ScrollableContent>
{workflowCategories.map((category) => (
<WorkflowList key={category} category={category} />
))}
</ScrollableContent>
</Box>
</Flex>
);
});
WorkflowListMenuContent.displayName = 'WorkflowListMenuContent';