Skip to content

Commit

Permalink
feat(organizations): add queryclientprovider to basic layout TASK-1324 (
Browse files Browse the repository at this point in the history
#5322)

### 📣 Summary
Add QueryClientProvider to BasicLayout so react-query is accessible for
TOS and invalidated password views.

### 👀 Preview steps
1. Set up an MMO member account that has not accepted required TOS
agreement
2. Login.
3. On main, an error will be thrown by react-query
4. On this branch, no error will be thrown.
  • Loading branch information
jamesrkiger authored Dec 3, 2024
1 parent 16b2fbc commit be25956
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jsapp/js/router/basicLayout.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import MainHeaderLogo from 'js/components/header/mainHeaderLogo.component';
import AccountMenu from 'js/components/header/accountMenu';
import {Tracking} from './useTracking';
import ToasterConfig from '../toasterConfig';
import { QueryClientProvider } from '@tanstack/react-query';
import { queryClient } from '../query/queryClient';

interface BasicLayoutProps {
children: React.ReactNode;
Expand All @@ -18,7 +20,7 @@ interface BasicLayoutProps {
export default function BasicLayout(props: BasicLayoutProps) {
return (
<DocumentTitle title='KoboToolbox'>
<>
<QueryClientProvider client={queryClient}>
<Tracking />
<ToasterConfig />
<div className='header-stretch-bg' />
Expand All @@ -33,7 +35,7 @@ export default function BasicLayout(props: BasicLayoutProps) {
{props.children}
</bem.PageWrapper__content>
</bem.PageWrapper>
</>
</QueryClientProvider>
</DocumentTitle>
);
}

0 comments on commit be25956

Please sign in to comment.