Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update footer ternary to use publicRuntimeConfig value
  • Loading branch information
krischarbonneau committed Jul 15, 2024
commit ad18baf92e5e082c5ffa55a9467b687c718e5cdd
66 changes: 25 additions & 41 deletions components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { useRouter } from 'next/router'
import throttle from 'lodash.throttle'
import IdleTimeout from './IdleTimeout'
import { signOut } from 'next-auth/react'
import getConfig from 'next/config'

export default function Layout(props) {
const t = props.locale === 'en' ? en : fr
Expand Down Expand Up @@ -144,48 +145,31 @@ export default function Layout(props) {
<main id="mainContent" className="sch-container grid gap-[30px]">
{props.children}
</main>

<IdleTimeout locale={props.locale} refPageAA={props.refPageAA} />

{process.env.ENVIRONMENT === 'production' ? (
<Footer
lang={!props.locale ? 'en' : props.locale}
brandLinks={[
{
href: t.footerTermsAndConditionURL,
id: 'linkTC',
text: t.footerTermsAndCondition,
},
{
href: t.footerPrivacyURL,
id: 'linkPR',
text: t.footerPrivacy,
},
]}
contactLink={contactLink}
btnLink="#top"
id="page-footer"
/>
) : (
<Footer
lang={!props.locale ? 'en' : props.locale}
brandLinks={[
{
href: t.footerTermsAndConditionDevURL,
id: 'linkTC',
text: t.footerTermsAndCondition,
},
{
href: t.footerPrivacyDevURL,
id: 'linkPR',
text: t.footerPrivacy,
},
]}
contactLink={contactLink}
btnLink="#top"
id="page-footer"
/>
)}
<Footer
lang={!props.locale ? 'en' : props.locale}
brandLinks={[
{
href:
getConfig()?.publicRuntimeConfig.ENVIRONMENT === 'production'
? t.footerTermsAndConditionURL
: t.footerTermsAndConditionDevURL,
id: 'linkTC',
text: t.footerTermsAndCondition,
},
{
href:
getConfig()?.publicRuntimeConfig.ENVIRONMENT === 'production'
? t.footerPrivacyURL
: t.footerPrivacyDevURL,
id: 'linkPR',
text: t.footerPrivacy,
},
]}
contactLink={contactLink}
btnLink="#top"
id="page-footer"
/>
</>
)
}
Expand Down
195 changes: 193 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@fortawesome/react-fontawesome": "^0.2.2",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/exporter-jaeger": "^1.25.1",
"@opentelemetry/exporter-metrics-otlp-proto": "^0.51.1",
"@opentelemetry/sdk-node": "^0.51.1",
"@typescript-eslint/eslint-plugin": "^7.12.0",
Expand Down