fix(flowsContext.tsx): remove unnecessary console.log statement
fix(shareModal/index.tsx): remove unused state variable and update saveFlow function call to use flow variable instead of finding flow by id
This commit is contained in:
parent
80c6f7cec6
commit
1f81f1a057
2 changed files with 3 additions and 4 deletions
|
|
@ -670,7 +670,7 @@ export function FlowsProvider({ children }: { children: ReactNode }) {
|
|||
};
|
||||
});
|
||||
|
||||
console.log(tabsState);
|
||||
console.log(flows.find((flow) => flow.id === newFlow.id));
|
||||
}
|
||||
} catch (err) {
|
||||
setErrorData({
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ export default function ShareModal({
|
|||
const [unavaliableNames, setUnavaliableNames] = useState<string[]>([]);
|
||||
const { saveFlow, flows, tabId } = useContext(FlowsContext);
|
||||
|
||||
const [nameIsAvailable, setNameIsAvailable] = useState(false);
|
||||
const [loadingNames, setLoadingNames] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -114,7 +113,7 @@ export default function ShareModal({
|
|||
is_component: is_component,
|
||||
});
|
||||
|
||||
await saveFlow(flows.find((flow) => flow.id === tabId)!, true);
|
||||
await saveFlow(flow!, true);
|
||||
|
||||
saveFlowStore(flow!, getTagsIds(selectedTags, tags), sharePublic).then(
|
||||
() => {
|
||||
|
|
@ -213,7 +212,7 @@ export default function ShareModal({
|
|||
)}
|
||||
</>
|
||||
);
|
||||
}, [unavaliableNames, name, loadingNames]);
|
||||
}, [unavaliableNames, name, loadingNames, handleShareComponent]);
|
||||
|
||||
return (
|
||||
<BaseModal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue