Try server side props

This commit is contained in:
Marvin Sextro 2021-07-02 23:26:46 +02:00
parent a7cc4ff559
commit 50142da956
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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']))

View File

@ -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'])),