Skip to content

Commit

Permalink
Update App.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
bsu3338 authored Jul 29, 2023
1 parent 1c7e97a commit 95dc863
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
@@ -9,13 +9,12 @@ import { router } from './routes';

const App = () => {
const { setError } = useApiErrorBoundary();

const queryClient = new QueryClient({
queryCache: new QueryCache({
onError: (error) => {
if (error?.response?.status === 401){
if (error?.response?.status === 401) {
setError(error);
window.dispatchEvent(new CustomEvent('attemptRefresh'));
}
},
}),

0 comments on commit 95dc863

Please sign in to comment.