Skip to content

Commit

Permalink
comment buggy code.
Browse files Browse the repository at this point in the history
seems isFetchingSettings is not updated.
  • Loading branch information
SmartManoj committed Feb 2, 2025
1 parent f237012 commit a9fa9cc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions frontend/src/components/features/sidebar/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ export function Sidebar() {
}
}, [user.isError]);

React.useEffect(() => {
// We don't show toast errors for settings in the global error handler
// because we have a special case for 404 errors
if (!isFetchingSettings && settingsError?.status !== 404) {
toast.error(
"Something went wrong while fetching settings. Please reload the page.",
);
}
}, [settingsError?.status, isFetchingSettings]);
// React.useEffect(() => {
// // We don't show toast errors for settings in the global error handler
// // because we have a special case for 404 errors
// if (!isFetchingSettings && settingsError?.status !== 404) {
// toast.error(
// "Something went wrong while fetching settings. Please reload the page.",
// );
// }
// }, [settingsError?.status, isFetchingSettings]);

const handleEndSession = () => {
dispatch(setCurrentAgentState(AgentState.LOADING));
Expand Down

0 comments on commit a9fa9cc

Please sign in to comment.