File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,10 +33,6 @@ export const App = ({ children }: { children?: React.ReactNode }) => {
3333 dispatch ( setLanguage ( language , { persistPreference : false } ) ) ;
3434 } , [ language ] ) ;
3535
36- // TODO: do we actually need this? - Linda
37- const [ isMounted , setIsMounted ] = useState ( false ) ;
38- useEffect ( ( ) => setIsMounted ( true ) , [ ] ) ;
39-
4036 const previousLocationRef = useRef ( location ) ;
4137 useEffect ( ( ) => {
4238 const prevLocation = previousLocationRef . current ;
@@ -54,7 +50,7 @@ export const App = ({ children }: { children?: React.ReactNode }) => {
5450 return (
5551 < div className = "app" >
5652 < CookieConsent hide = { hide } />
57- { isMounted && showReduxDevTools ( ) && < DevTools /> }
53+ { showReduxDevTools ( ) && < DevTools /> }
5854 { children }
5955 </ div >
6056 ) ;
Original file line number Diff line number Diff line change @@ -5,12 +5,13 @@ import rootReducer from './reducers';
55import type { RootState } from './reducers' ;
66import { clearState , loadState } from './persistState' ;
77import { getConfig } from './utils/getConfig' ;
8+ import { parseBoolean } from './utils/parseStringToType' ;
89
910// Enable DevTools only when rendering on client and during development.
1011// Display the dock monitor only if no browser extension is found.
1112export function showReduxDevTools ( ) {
1213 return (
13- getConfig ( 'CLIENT' ) &&
14+ parseBoolean ( getConfig ( 'CLIENT' ) , true ) &&
1415 getConfig ( 'NODE_ENV' ) === 'development' &&
1516 ! window . __REDUX_DEVTOOLS_EXTENSION__
1617 ) ;
You can’t perform that action at this time.
0 commit comments