Skip to content

Commit

Permalink
hotfix: disable prerendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Entkenntnis committed May 21, 2024
1 parent aad4aea commit b3a50e9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
11 changes: 7 additions & 4 deletions apps/web/src/pages/biologie.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { GetStaticProps } from 'next'

import { SubjectLanding } from '@/components/pages/subject-landing'
import { SlugProps, TaxonomyPage } from '@/data-types'
import { subjectLandingGetStaticProps } from '@/fetcher/subject-landing/subject-landing-get-static-props'
// import { subjectLandingGetStaticProps } from '@/fetcher/subject-landing/subject-landing-get-static-props'
import { renderedPageNoHooks } from '@/helper/rendered-page'

const subject = 'biologie'
Expand All @@ -13,7 +13,10 @@ export default renderedPageNoHooks<{ pageData: TaxonomyPage }>(
}
)

export const getStaticProps: GetStaticProps<SlugProps> = async (context) => {
if (context.locale !== 'de') return { notFound: true }
return subjectLandingGetStaticProps(context.locale, subject)
export const getStaticProps: GetStaticProps<
SlugProps
> = async (/*context*/) => {
return { notFound: true }
// if (context.locale !== 'de') return { notFound: true }
// return subjectLandingGetStaticProps(context.locale, subject)
}
11 changes: 7 additions & 4 deletions apps/web/src/pages/chemie.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { GetStaticProps } from 'next'

import { SubjectLanding } from '@/components/pages/subject-landing'
import { SlugProps, TaxonomyPage } from '@/data-types'
import { subjectLandingGetStaticProps } from '@/fetcher/subject-landing/subject-landing-get-static-props'
// import { subjectLandingGetStaticProps } from '@/fetcher/subject-landing/subject-landing-get-static-props'
import { renderedPageNoHooks } from '@/helper/rendered-page'

const subject = 'chemie'
Expand All @@ -13,7 +13,10 @@ export default renderedPageNoHooks<{ pageData: TaxonomyPage }>(
}
)

export const getStaticProps: GetStaticProps<SlugProps> = async (context) => {
if (context.locale !== 'de') return { notFound: true }
return subjectLandingGetStaticProps(context.locale, subject)
export const getStaticProps: GetStaticProps<
SlugProps
> = async (/*context*/) => {
return { notFound: true }
// if (context.locale !== 'de') return { notFound: true }
// return subjectLandingGetStaticProps(context.locale, subject)
}
11 changes: 7 additions & 4 deletions apps/web/src/pages/lerntipps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { GetStaticProps } from 'next'

import { SubjectLanding } from '@/components/pages/subject-landing'
import { SlugProps, TaxonomyPage } from '@/data-types'
import { subjectLandingGetStaticProps } from '@/fetcher/subject-landing/subject-landing-get-static-props'
// import { subjectLandingGetStaticProps } from '@/fetcher/subject-landing/subject-landing-get-static-props'
import { renderedPageNoHooks } from '@/helper/rendered-page'

const subject = 'lerntipps'
Expand All @@ -13,7 +13,10 @@ export default renderedPageNoHooks<{ pageData: TaxonomyPage }>(
}
)

export const getStaticProps: GetStaticProps<SlugProps> = async (context) => {
if (context.locale !== 'de') return { notFound: true }
return subjectLandingGetStaticProps(context.locale, subject)
export const getStaticProps: GetStaticProps<
SlugProps
> = async (/*context*/) => {
return { notFound: true }
// if (context.locale !== 'de') return { notFound: true }
// return subjectLandingGetStaticProps(context.locale, subject)
}

0 comments on commit b3a50e9

Please sign in to comment.