1- import { use , useRef , useState , useMemo } from 'react' ;
1+ import { use , useRef , useState } from 'react' ;
22import SkipLink from '#psammead/psammead-brand/src/SkipLink' ;
33import { RequestContext } from '#contexts/RequestContext' ;
44import useOperaMiniDetection from '#hooks/useOperaMiniDetection' ;
@@ -12,7 +12,6 @@ import {
1212} from '#app/routes/utils/pageTypes' ;
1313import LiteSiteSummary from '#app/components/LiteSiteSummary' ;
1414import AccountHeader from '#app/components/Account/AccountHeader' ;
15- import { AccountContext } from '#contexts/AccountContext' ;
1615import { ServiceContext } from '../../../contexts/ServiceContext' ;
1716import ConsentBanner from '../ConsentBanner' ;
1817import NavigationContainer from '../Navigation' ;
@@ -68,16 +67,6 @@ const HeaderContainer = ({ navItems, propsForTopBarOJComponent }) => {
6867 const isOperaMini = useOperaMiniDetection ( ) ;
6968
7069 const brandRef = useRef ( null ) ;
71- // const accountContextValue = useContext(AccountContext);
72-
73- const accountContextValue = useMemo (
74- ( ) => ( {
75- isSignedIn : false ,
76- signInUrl : '/signin' ,
77- forYouUrl : '/for-you' ,
78- } ) ,
79- [ ] ,
80- ) ;
8170
8271 // `serviceLang` is defined when the language the page is written in is different to the
8372 // language of the service. `serviceLang` is used to override the page language.
@@ -120,19 +109,15 @@ const HeaderContainer = ({ navItems, propsForTopBarOJComponent }) => {
120109 skipLink = { skipLink }
121110 scriptLink = { shouldRenderScriptSwitch && < ScriptLink /> }
122111 >
123- < AccountContext . Provider value = { accountContextValue } >
124- < AccountHeader />
125- </ AccountContext . Provider >
112+ < AccountHeader />
126113 </ Header >
127114 ) : (
128115 < Header
129116 brandRef = { brandRef }
130117 skipLink = { skipLink }
131118 scriptLink = { shouldRenderScriptSwitch && < ScriptLink /> }
132119 >
133- < AccountContext . Provider value = { accountContextValue } >
134- < AccountHeader />
135- </ AccountContext . Provider >
120+ < AccountHeader />
136121 </ Header >
137122 ) }
138123 { isLite && < LiteSiteSummary /> }
0 commit comments