Skip to content

Commit

Permalink
Handle request event
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Jan 10, 2025
1 parent 82a0800 commit c1b94ad
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import JobsGeneral from './Jobs/JobsGeneral';
import HomePage from './HomePage';
import ValueEditor from './ValueEditor';
import GlobalStyles from './GlobalStyles';
import { clearFailedAuthRequestsQueue, retryFailedAuthRequests } from './api';

// Initialize Google Analytics
ReactGA.initialize('G-7XJBCP6P75');
Expand All @@ -28,6 +29,12 @@ const App: FC = () => {
if ('scigateway:api:plugin_rerender'.match(action)) {
forceUpdate();
}
if ('scigateway:api:invalidate_token'.match(action)) {
retryFailedAuthRequests();
}
if ('scigateway:api:signout'.match(action)) {
clearFailedAuthRequestsQueue();
}
}

React.useEffect(() => {
Expand Down

0 comments on commit c1b94ad

Please sign in to comment.