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;
action: 'sendToImg2Img' | 'sendToCanvas' | 'useAllParameters';
};
selectedWorkflow?: string;
selectedWorkflowId?: string;
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 logger = useLogger('system');
const dispatch = useAppDispatch();
@ -81,11 +81,11 @@ const App = ({ config = DEFAULT_CONFIG, selectedImage, selectedWorkflow, destina
});
useEffect(() => {
if (selectedWorkflow && !hasLoadedRef.current) {
getAndLoadWorkflow(selectedWorkflow);
if (selectedWorkflowId && !hasLoadedRef.current) {
getAndLoadWorkflow(selectedWorkflowId);
hasLoadedRef.current = true;
}
}, [selectedWorkflow, getAndLoadWorkflow]);
}, [selectedWorkflowId, getAndLoadWorkflow]);
useEffect(() => {
if (destination) {

View File

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