Features: 1) Add i18n support with multiple locales and default locale in next.config;
Fixes: 1) Add missing import for useRouter in index.tsx; Extra: n/a;
This commit is contained in:
parent
ba90b98455
commit
4e4c9c4f4f
2 changed files with 25 additions and 1 deletions
|
|
@ -1,7 +1,30 @@
|
|||
import type {NextConfig} from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
/* config options here */
|
||||
i18n: {
|
||||
locales: [
|
||||
'en-gb',
|
||||
'ar-ar',
|
||||
'cs-cz',
|
||||
'da-dk',
|
||||
'de-de',
|
||||
'en-us',
|
||||
'es-es',
|
||||
'fr-fr',
|
||||
'hi-in',
|
||||
'it-it',
|
||||
'ja-jp',
|
||||
'kk-kz',
|
||||
'nl-nl',
|
||||
'pl-pl',
|
||||
'pt-br',
|
||||
'ro-ro',
|
||||
'ru-ru',
|
||||
'zh-hans'
|
||||
],
|
||||
defaultLocale: 'en-gb',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
export default nextConfig;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import {apolloClient} from 'graphql/apolloClient';
|
||||
import {GET_PRODUCTS} from 'graphql/queries/getProducts';
|
||||
import {GetStaticProps} from 'next';
|
||||
import {useRouter} from "next/router";
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => {
|
||||
const {data} = await apolloClient.query({
|
||||
|
|
|
|||
Loading…
Reference in a new issue