@@ -3,21 +3,12 @@ import '@styles/app.scss';
33import { ClientLayout } from '@layouts/client/client-layout' ;
44import content from '@content/content' ;
55import { getBasePath } from '@utils/get-base-path' ;
6- import { LogoutWarningModal } from '@molecules/LogoutWarningModal/LogoutWarningModal' ;
76
87export const metadata : Metadata = {
98 title : content . global . mainLayout . title ,
109 description : content . global . mainLayout . description ,
1110} ;
1211
13- const config = {
14- basePath : getBasePath ( ) ,
15- logoutInSeconds :
16- Number ( process . env . NEXT_PUBLIC_TIME_TILL_LOGOUT_SECONDS ) || 900 , // 15 minutes force logout
17- promptTimeSeconds :
18- Number ( process . env . NEXT_PUBLIC_PROMPT_SECONDS_BEFORE_LOGOUT ) || 120 , // 2 minutes before logout
19- } ;
20-
2112export default function RootLayout ( {
2213 children,
2314} : {
@@ -26,62 +17,56 @@ export default function RootLayout({
2617 return (
2718 < html lang = 'en' >
2819 < head >
29- < script src = { `${ config . basePath } /lib/nhsuk-9.1.0.min.js` } defer />
20+ < script src = { `${ getBasePath ( ) } /lib/nhsuk-9.1.0.min.js` } defer />
3021 < title > { content . global . mainLayout . title } </ title >
3122 < link
3223 rel = 'shortcut icon'
33- href = { `${ config . basePath } /lib/assets/favicons/favicon.ico` }
24+ href = { `${ getBasePath ( ) } /lib/assets/favicons/favicon.ico` }
3425 type = 'image/x-icon'
3526 />
3627 < link
3728 rel = 'apple-touch-icon'
38- href = { `${ config . basePath } /lib/assets/favicons/apple-touch-icon-180x180.png` }
29+ href = { `${ getBasePath ( ) } /lib/assets/favicons/apple-touch-icon-180x180.png` }
3930 />
4031 < link
4132 rel = 'mask-icon'
42- href = { `${ config . basePath } /lib/assets/favicons/favicon.svg` }
33+ href = { `${ getBasePath ( ) } /lib/assets/favicons/favicon.svg` }
4334 color = '#005eb8'
4435 />
4536 < link
4637 rel = 'icon'
4738 sizes = '192x192'
48- href = { `${ config . basePath } /lib/assets/favicons/favicon-192x192.png` }
39+ href = { `${ getBasePath ( ) } /lib/assets/favicons/favicon-192x192.png` }
4940 />
5041 < meta
5142 name = 'msapplication-TileImage'
52- content = { `${ config . basePath } /lib/assets/favicons/mediumtile-144x144.png` }
43+ content = { `${ getBasePath ( ) } /lib/assets/favicons/mediumtile-144x144.png` }
5344 />
5445 < meta name = 'msapplication-TileColor' content = '#005eb8' />
5546 < meta
5647 name = 'msapplication-square70x70logo'
57- content = { `${ config . basePath } /lib/assets/favicons/smalltile-70x70.png` }
48+ content = { `${ getBasePath ( ) } /lib/assets/favicons/smalltile-70x70.png` }
5849 />
5950 < meta
6051 name = 'msapplication-square150x150logo'
61- content = { `${ config . basePath } /lib/assets/favicons/mediumtile-150x150.png` }
52+ content = { `${ getBasePath ( ) } /lib/assets/favicons/mediumtile-150x150.png` }
6253 />
6354 < meta
6455 name = 'msapplication-wide310x150logo'
65- content = { `${ config . basePath } /lib/assets/favicons/widetile-310x150.png` }
56+ content = { `${ getBasePath ( ) } /lib/assets/favicons/widetile-310x150.png` }
6657 />
6758 < meta
6859 name = 'msapplication-square310x310logo'
69- content = { `${ config . basePath } /lib/assets/favicons/largetile-310x310.png` }
60+ content = { `${ getBasePath ( ) } /lib/assets/favicons/largetile-310x310.png` }
7061 />
7162 < script
7263 type = 'text/javascript'
73- src = { `${ config . basePath } /lib/nhs-frontend-js-check.js` }
64+ src = { `${ getBasePath ( ) } /lib/nhs-frontend-js-check.js` }
7465 defer
7566 />
7667 </ head >
7768 < body suppressHydrationWarning >
78- < ClientLayout >
79- < LogoutWarningModal
80- logoutInSeconds = { config . logoutInSeconds }
81- promptBeforeLogoutSeconds = { config . promptTimeSeconds }
82- />
83- { children }
84- </ ClientLayout >
69+ < ClientLayout > { children } </ ClientLayout >
8570 </ body >
8671 </ html >
8772 ) ;
0 commit comments