You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using common-props with next-i18next the defined props are missing from pageProps and from useCommonProps().
To Reproduce
I using common-props to get page specific data in layout components, in this case in the <Navbar />. I have a common-props.config.js file where I define the props:
In this case the navbarStyle value should be 'dark' but instead now it's undefined. This is worked fine until I added next-i18next to the project. I noticed if I remove the appWithTranslation function from src/pages/_app.tsx it's working again. It's also missing from pageProps.
I want to use common-props together with next-i18next. I assume that appWithTranslation function override some pageProps and that's why they are missing.
馃悰 Bug Report
When using
common-props
withnext-i18next
the defined props are missing frompageProps
and fromuseCommonProps()
.To Reproduce
I using
common-props
to get page specific data in layout components, in this case in the<Navbar />
. I have acommon-props.config.js
file where I define the props:And then I getting these props in the
<Navbar />
component. (<Navbar />
component is rendered inside the<Layout />
component):In this case the
navbarStyle
value should be'dark'
but instead now it'sundefined
. This is worked fine until I addednext-i18next
to the project. I noticed if I remove theappWithTranslation
function fromsrc/pages/_app.tsx
it's working again. It's also missing frompageProps
.Expected behavior
I want to use
common-props
together withnext-i18next
. I assume thatappWithTranslation
function override somepageProps
and that's why they are missing.Your Environment
next: v13.1.5
,node: v16.20.2
,Brave browser: Version 1.59.117 Chromium: 118.0.5993.70 (Official Build) (64-bit)
v23.5.1
v14.0.3
v13.2.2
Ubuntu 22.04.3 LTS
The text was updated successfully, but these errors were encountered: