Skip to content

Commit

Permalink
Remove toolbar toast ids
Browse files Browse the repository at this point in the history
  • Loading branch information
razin786 committed Jun 10, 2024
1 parent 6d79e68 commit 98354d3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/components/form-components/SortableItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ export function SortableItem<T extends propsTypes>({

function handleOnFocus() {
if (focusedItemRef.current.id === id) return;
console.log("still here");
focusedItemRef.current.blurItem();
focusedItemRef.current = {
...focusedItemRef.current,
Expand Down
7 changes: 0 additions & 7 deletions src/components/toolbar/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ const Toolbar = () => {
focusAndScrollToElement(errorElement, setIsSavingDialogOpen);
toast.error(errorObj.message, {
duration: 2500,
id: "fb-submit-toast",
});
}
return;
Expand Down Expand Up @@ -326,7 +325,6 @@ const Toolbar = () => {
focusAndScrollToElement(errorElement, setIsSavingDialogOpen);
toast.error(errorObj.message, {
duration: 2500,
id: "fb-submit-toast",
});
}
return;
Expand Down Expand Up @@ -372,7 +370,6 @@ const Toolbar = () => {
}

function handleSaveClick() {
toast.dismiss("fb-submit-toast");
setIsSavingDialogOpen(true);
const timeoutStart = Date.now();
isSavingRef.current = true;
Expand All @@ -385,7 +382,6 @@ const Toolbar = () => {
focusAndScrollToElement(errorElement, setIsSavingDialogOpen);
toast.error("Please fix all errors before submitting", {
duration: toastDuration,
id: "fb-submit-toast",
});
},
Math.max(savingTimeout - (Date.now() - timeoutStart), 0),
Expand All @@ -400,7 +396,6 @@ const Toolbar = () => {
() => {
toast.error(errorObj.message, {
duration: 2500,
id: "fb-submit-toast",
});
setIsSavingDialogOpen(false);
},
Expand All @@ -419,7 +414,6 @@ const Toolbar = () => {
);
toast.error(errorObj.message, {
duration: 2500,
id: "fb-submit-toast",
});
},
Math.max(savingTimeout - (Date.now() - timeoutStart), 0),
Expand All @@ -436,7 +430,6 @@ const Toolbar = () => {
setIsSavingDialogOpen(false);
toast.success("Form saved successfully!", {
duration: toastDuration,
id: "fb-submit-toast",
});
},
Math.max(savingTimeout - (Date.now() - timeoutStart), 0),
Expand Down

0 comments on commit 98354d3

Please sign in to comment.