mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
hook up Add Model button
This commit is contained in:
parent
4fd259bb89
commit
7801b8c42f
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user