From ffb1b83faf6f9f9c61b986e1f0a9f6fdcb90b08d Mon Sep 17 00:00:00 2001 From: Walidoux Date: Mon, 16 May 2022 13:33:56 +0100 Subject: [PATCH] fix: porblem with default locale --- components/NextHead.tsx | 9 ++++----- types/projectConfig.ts | 8 +++++++- utils/config.ts | 1 + 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/components/NextHead.tsx b/components/NextHead.tsx index 64906d8..017571d 100644 --- a/components/NextHead.tsx +++ b/components/NextHead.tsx @@ -1,5 +1,4 @@ import Head from 'next/head' -import useTranslation from 'next-translate/useTranslation' import { projectConfig } from 'utils/config' @@ -10,8 +9,6 @@ interface HeadProps { const NextHead: React.FC = (props) => { const { title = projectConfig.shortName } = props - const { lang } = useTranslation() - return ( {title} @@ -43,7 +40,7 @@ const NextHead: React.FC = (props) => { - + @@ -62,7 +59,9 @@ const NextHead: React.FC = (props) => { diff --git a/types/projectConfig.ts b/types/projectConfig.ts index 2068f0c..6fd8b72 100644 --- a/types/projectConfig.ts +++ b/types/projectConfig.ts @@ -1,4 +1,10 @@ -type PCKeys = 'shortName' | 'longName' | 'description' | 'url' | 'color' +type PCKeys = + | 'shortName' + | 'longName' + | 'description' + | 'url' + | 'color' + | 'defaultLocale' type PCIconsKeys = 'default' | 'image' | 'apple' | '16_16' | '32_32' type PCProps = Record diff --git a/utils/config.ts b/utils/config.ts index 2812945..a189980 100644 --- a/utils/config.ts +++ b/utils/config.ts @@ -6,6 +6,7 @@ export const projectConfig: PCDefaultValues = { description: 'The latest Next.js boilerplate starter code/time saver with Typescript / SCSS. Including linters such as: Prettier, Eslint and Stylelint.', url: 'Unknown project url', + defaultLocale: 'en', color: '#775aaa', icons: { image: '/images/Logo.png',