diff --git a/sites/org/pages/account/patterns/index.mjs b/sites/org/pages/account/patterns/index.mjs index fe8b3902823..4665d61ee04 100644 --- a/sites/org/pages/account/patterns/index.mjs +++ b/sites/org/pages/account/patterns/index.mjs @@ -1,13 +1,16 @@ // Dependencies import dynamic from 'next/dynamic' import { serverSideTranslations } from 'next-i18next/serverSideTranslations' +import { nsMerge } from 'shared/utils.mjs' +// Hooks +import { useTranslation } from 'next-i18next' // Components import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs' import { ns as authNs } from 'shared/components/wrappers/auth/index.mjs' import { ns as setsNs } from 'shared/components/account/sets.mjs' // Translation namespaces used on this page -const namespaces = [...new Set([...setsNs, ...authNs, ...pageNs])] +const ns = nsMerge(setsNs, authNs, pageNs) /* * Some things should never generated as SSR @@ -29,20 +32,24 @@ const DynamicPatterns = dynamic( * when path and locale come from static props (as here) * or set them manually. */ -const AccountSetsPage = ({ page }) => ( - - - - - -) +const AccountSetsPage = ({ page }) => { + const { t } = useTranslation(ns) + + return ( + + + + + + ) +} export default AccountSetsPage export async function getStaticProps({ locale }) { return { props: { - ...(await serverSideTranslations(locale, namespaces)), + ...(await serverSideTranslations(locale, ns)), page: { locale, path: ['account', 'patterns'],