change selectedWorkflow to selectedWorkflowId

This commit is contained in:
chainchompa 2024-08-14 11:22:32 -04:00
parent 8840df2b00
commit 88648dca1a
2 changed files with 8 additions and 8 deletions

View File

@ -38,11 +38,11 @@ interface Props {
imageName: string; imageName: string;
action: 'sendToImg2Img' | 'sendToCanvas' | 'useAllParameters'; action: 'sendToImg2Img' | 'sendToCanvas' | 'useAllParameters';
}; };
selectedWorkflow?: string; selectedWorkflowId?: string;
destination?: InvokeTabName | undefined; destination?: InvokeTabName | undefined;
} }
const App = ({ config = DEFAULT_CONFIG, selectedImage, selectedWorkflow, destination }: Props) => { const App = ({ config = DEFAULT_CONFIG, selectedImage, selectedWorkflowId, destination }: Props) => {
const language = useAppSelector(languageSelector); const language = useAppSelector(languageSelector);
const logger = useLogger('system'); const logger = useLogger('system');
const dispatch = useAppDispatch(); const dispatch = useAppDispatch();
@ -81,11 +81,11 @@ const App = ({ config = DEFAULT_CONFIG, selectedImage, selectedWorkflow, destina
}); });
useEffect(() => { useEffect(() => {
if (selectedWorkflow && !hasLoadedRef.current) { if (selectedWorkflowId && !hasLoadedRef.current) {
getAndLoadWorkflow(selectedWorkflow); getAndLoadWorkflow(selectedWorkflowId);
hasLoadedRef.current = true; hasLoadedRef.current = true;
} }
}, [selectedWorkflow, getAndLoadWorkflow]); }, [selectedWorkflowId, getAndLoadWorkflow]);
useEffect(() => { useEffect(() => {
if (destination) { if (destination) {

View File

@ -44,7 +44,7 @@ interface Props extends PropsWithChildren {
imageName: string; imageName: string;
action: 'sendToImg2Img' | 'sendToCanvas' | 'useAllParameters'; action: 'sendToImg2Img' | 'sendToCanvas' | 'useAllParameters';
}; };
selectedWorkflow?: string; selectedWorkflowId?: string;
destination?: InvokeTabName; destination?: InvokeTabName;
customStarUi?: CustomStarUi; customStarUi?: CustomStarUi;
socketOptions?: Partial<ManagerOptions & SocketOptions>; socketOptions?: Partial<ManagerOptions & SocketOptions>;
@ -65,7 +65,7 @@ const InvokeAIUI = ({
projectUrl, projectUrl,
queueId, queueId,
selectedImage, selectedImage,
selectedWorkflow, selectedWorkflowId,
destination, destination,
customStarUi, customStarUi,
socketOptions, socketOptions,
@ -226,7 +226,7 @@ const InvokeAIUI = ({
<App <App
config={config} config={config}
selectedImage={selectedImage} selectedImage={selectedImage}
selectedWorkflow={selectedWorkflow} selectedWorkflowId={selectedWorkflowId}
destination={destination} destination={destination}
/> />
</AppDndContext> </AppDndContext>