I am simply trying to use the context parameter from Next Js's getStaticProps function, but when I console log it, I get "{ locales: undefined, locale: undefined, defaultLocale: undefined }".
I use getStaticProps inside the pages folder as I am supposed to but I still get that weird object on all pages.
I would really appreciate any help as I was not able to find any information.
CodePudding user response:
It's totally normal, it's part of Next.js i18n routing
localecontains the active locale (if enabled).localescontains all supported locales (if enabled).defaultLocalecontains the configured default locale (if enabled).
Don't worry about it if you are not using internationalisation.
