fix(shareModal/index.tsx): make handleShareComponent function asynchronous to ensure proper flow saving before saving flow store
This commit is contained in:
parent
907c2d7606
commit
79d7d4ad4b
1 changed files with 2 additions and 2 deletions
|
|
@ -92,7 +92,7 @@ export default function ShareModal({
|
|||
setDescription(component?.description ?? "");
|
||||
}, [component, open, internalOpen]);
|
||||
|
||||
const handleShareComponent = () => {
|
||||
const handleShareComponent = async () => {
|
||||
//remove file names from flows before sharing
|
||||
removeFileNameFromComponents(component);
|
||||
const flow: FlowType = checked
|
||||
|
|
@ -113,7 +113,7 @@ export default function ShareModal({
|
|||
is_component: is_component,
|
||||
});
|
||||
|
||||
saveFlow(flows.find((flow) => flow.id === tabId)!, true);
|
||||
await saveFlow(flows.find((flow) => flow.id === tabId)!, true);
|
||||
|
||||
saveFlowStore(flow!, getTagsIds(selectedTags, tags), sharePublic).then(
|
||||
() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue