hook up Add Model button

This commit is contained in:
Mary Hipp 2024-02-21 09:41:50 -05:00 committed by psychedelicious
parent 4fd259bb89
commit 7801b8c42f

View File

@ -3,8 +3,16 @@ import { SyncModelsIconButton } from 'features/modelManager/components/SyncModel
import ModelList from './ModelManagerPanel/ModelList';
import { ModelListNavigation } from './ModelManagerPanel/ModelListNavigation';
import { useCallback } from 'react';
import { useAppDispatch } from '../../../app/store/storeHooks';
import { setSelectedModelKey } from '../store/modelManagerV2Slice';
export const ModelManager = () => {
const dispatch = useAppDispatch();
const handleClickAddModel = useCallback(() => {
dispatch(setSelectedModelKey(null));
}, [dispatch]);
return (
<Box layerStyle="first" p={3} borderRadius="base" w="full" h="full">
<Flex w="full" p={3} justifyContent="space-between" alignItems="center">
@ -13,7 +21,9 @@ export const ModelManager = () => {
<SyncModelsIconButton />
</Flex>
<Flex gap={2}>
<Button colorScheme="invokeYellow">Add Model</Button>
<Button colorScheme="invokeYellow" onClick={handleClickAddModel}>
Add Model
</Button>
<Button>Scan for Models</Button>
</Flex>
</Flex>