Skip to content

Commit

Permalink
fix(terms): always use SSR instead
Browse files Browse the repository at this point in the history
- static generation does not build due to runtime config not exist
  • Loading branch information
MrOrz committed Jan 16, 2024
1 parent ef6630a commit 90e7956
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/terms.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const TermArticle = styled('article')(({ theme }) => ({
},
}));

export async function getStaticProps() {
export async function getServerSideProps() {
const markdown = await fs.readFile(
path.resolve(process.cwd(), './LEGAL.md'),
'utf8'
Expand Down Expand Up @@ -77,7 +77,7 @@ function Terms({ termsHtml }) {
);
}

// FIXME: this page don't need SSR, but we need to use `withData` for AppLayout to work.
// FIXME: this page we always do SSR, but we need to use `withData` for AppLayout to work.
// Migrate to server components to get rid of Apollo client alltogether.
//
const TermsWithData = withData(Terms);
Expand Down

0 comments on commit 90e7956

Please sign in to comment.