Skip to content

Commit 7c8e04d

Browse files
committed
chore: remove catch toast alert
1 parent 80ce943 commit 7c8e04d

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

apps/web/core/components/navigation/use-tab-preferences.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,13 @@ export const useTabPreferences = (workspaceSlug: string, projectId: string): TTa
7979
const handleToggleDefaultTab = (tabKey: string) => {
8080
const newDefaultTab = tabKey === tabPreferences.defaultTab ? DEFAULT_TAB_KEY : tabKey;
8181
const newPreferences = { ...tabPreferences, defaultTab: newDefaultTab };
82-
updatePreferences(newPreferences)
83-
.then(() => {
84-
setToast({
85-
type: TOAST_TYPE.SUCCESS,
86-
title: "Success!",
87-
message: "Default tab updated successfully.",
88-
});
89-
})
90-
.catch(() => {
91-
setToast({
92-
type: TOAST_TYPE.ERROR,
93-
title: "Error!",
94-
message: "Failed to update default tab. Please try again later.",
95-
});
82+
updatePreferences(newPreferences).then(() => {
83+
setToast({
84+
type: TOAST_TYPE.SUCCESS,
85+
title: "Success!",
86+
message: "Default tab updated successfully.",
9687
});
88+
});
9789
};
9890

9991
/**

0 commit comments

Comments
 (0)