From 50142da95665bd28140db3a0773ba1faccccbca1 Mon Sep 17 00:00:00 2001 From: Marvin Sextro Date: Fri, 2 Jul 2021 23:26:46 +0200 Subject: [PATCH] Try server side props --- Dockerfile | 4 ++-- pages/imprint.tsx | 2 +- pages/privacy.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 76e0957..41a85ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,8 +23,8 @@ RUN addgroup -g 1001 -S nodejs RUN adduser -S nextjs -u 1001 # 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-i18next.config.js ./ +COPY --from=builder /app/next.config.js ./next.config.js +COPY --from=builder /app/next-i18next.config.js ./next-i18next.config.js COPY --from=builder /app/public ./public COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next COPY --from=builder /app/node_modules ./node_modules diff --git a/pages/imprint.tsx b/pages/imprint.tsx index e4d8116..2c9a75a 100644 --- a/pages/imprint.tsx +++ b/pages/imprint.tsx @@ -41,7 +41,7 @@ function Imprint(): JSX.Element { ) } -export async function getStaticProps({ locale }) { +export async function getServerSideProps({ locale }) { return { props: { ...(await serverSideTranslations(locale, ['index', 'imprint', 'common'])) diff --git a/pages/privacy.tsx b/pages/privacy.tsx index 1920ac6..9c5836a 100644 --- a/pages/privacy.tsx +++ b/pages/privacy.tsx @@ -166,7 +166,7 @@ function Privacy(): JSX.Element { ) } -export async function getStaticProps({ locale }) { +export async function getServerSideProps({ locale }) { return { props: { ...(await serverSideTranslations(locale, ['index', 'privacy', 'common'])),