{
return (
@@ -28,7 +28,7 @@ const Language = ({
{abbr ? (
)
}
-
-Language.defaultProps = {
- path: '/',
-}
-
export default Language
diff --git a/components/Layout.js b/components/Layout.js
index 884528104..0a8196253 100644
--- a/components/Layout.js
+++ b/components/Layout.js
@@ -1,18 +1,44 @@
+import throttle from 'lodash.throttle'
+import { signOut } from 'next-auth/react'
+import getConfig from 'next/config'
+import { useRouter } from 'next/router'
import PropTypes from 'prop-types'
-import { useState, useCallback, useMemo, useEffect } from 'react'
-import Header from './Header'
-import Footer from './Footer'
-import MetaData from './MetaData'
+import { useCallback, useEffect, useMemo, useState } from 'react'
import en from '../locales/en'
import fr from '../locales/fr'
import { lato, notoSans } from '../utils/fonts'
-import { useRouter } from 'next/router'
-import throttle from 'lodash.throttle'
+import Footer from './Footer'
+import Header from './Header'
import IdleTimeout from './IdleTimeout'
-import { signOut } from 'next-auth/react'
-import getConfig from 'next/config'
+import MetaData from './MetaData'
-export default function Layout(props) {
+export default function Layout(
+ props = {
+ locale: 'en',
+ meta: '',
+ langToggleLink: '',
+ breadCrumbItems: [],
+ bannerContent: {
+ bannerBoldText: '',
+ bannerText: '',
+ bannerLink: '',
+ bannerLinkHref: '',
+ bannerSummaryTitle: '',
+ bannerSummaryContent: '',
+ bannerButtonText: '',
+ bannerButtonLink: '',
+ icon: '',
+ },
+ popupContentNA,
+ content,
+ popupContent,
+ display: { hideBanner: true },
+ popupStaySignedIn,
+ refPageAA,
+ dataGcAnalyticsCustomClickMenuVariable,
+ title: 'Service.Canada.ca',
+ },
+) {
const t = props.locale === 'en' ? en : fr
const [response, setResponse] = useState()
const router = useRouter()
@@ -174,32 +200,6 @@ export default function Layout(props) {
)
}
-/**
- * Setup default props
- */
-
-Layout.defaultProps = {
- title: 'Service.Canada.ca',
- bannerContent: {
- bannerBoldText: '',
- bannerText: '',
-
- bannerLink: '',
- bannerLinkHref: '',
-
- bannerSummaryTitle: '',
- bannerSummaryContent: '',
- bannerButtonText: '',
- bannerButtonLink: '',
- icon: '',
- },
- breadCrumbItems: [],
- display: { hideBanner: true },
- langToggleLink: '',
- locale: 'en',
- meta: '',
-}
-
Layout.propTypes = {
/*
* Locale current language
diff --git a/components/Menu.tsx b/components/Menu.tsx
index 83b690805..9118fe0a4 100644
--- a/components/Menu.tsx
+++ b/components/Menu.tsx
@@ -16,7 +16,11 @@ interface MenuProps {
menuList: MenuItem[]
}
-const Menu = ({ lang, dataGcAnalyticsCustomClick, menuList }: MenuProps) => {
+const Menu = ({
+ lang,
+ dataGcAnalyticsCustomClick = 'mscaPlaceholder',
+ menuList,
+}: MenuProps) => {
const [showDropdown, setShowDropdown] = useState
(false)
const dropdown = useRef(null)
@@ -49,7 +53,7 @@ const Menu = ({ lang, dataGcAnalyticsCustomClick, menuList }: MenuProps) => {
return (