Try server side props
This commit is contained in:
parent
a7cc4ff559
commit
50142da956
|
@ -23,8 +23,8 @@ RUN addgroup -g 1001 -S nodejs
|
||||||
RUN adduser -S nextjs -u 1001
|
RUN adduser -S nextjs -u 1001
|
||||||
|
|
||||||
# You only need to copy next.config.js if you are NOT using the default configuration
|
# You only need to copy next.config.js if you are NOT using the default configuration
|
||||||
COPY --from=builder /app/next.config.js ./
|
COPY --from=builder /app/next.config.js ./next.config.js
|
||||||
COPY --from=builder /app/next-i18next.config.js ./
|
COPY --from=builder /app/next-i18next.config.js ./next-i18next.config.js
|
||||||
COPY --from=builder /app/public ./public
|
COPY --from=builder /app/public ./public
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
|
COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
|
||||||
COPY --from=builder /app/node_modules ./node_modules
|
COPY --from=builder /app/node_modules ./node_modules
|
||||||
|
|
|
@ -41,7 +41,7 @@ function Imprint(): JSX.Element {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getStaticProps({ locale }) {
|
export async function getServerSideProps({ locale }) {
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
...(await serverSideTranslations(locale, ['index', 'imprint', 'common']))
|
...(await serverSideTranslations(locale, ['index', 'imprint', 'common']))
|
||||||
|
|
|
@ -166,7 +166,7 @@ function Privacy(): JSX.Element {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getStaticProps({ locale }) {
|
export async function getServerSideProps({ locale }) {
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
...(await serverSideTranslations(locale, ['index', 'privacy', 'common'])),
|
...(await serverSideTranslations(locale, ['index', 'privacy', 'common'])),
|
||||||
|
|
Loading…
Reference in New Issue