Skip to content

Commit

Permalink
Added in getStaticProps to pages. Fix for colbyfayock#212
Browse files Browse the repository at this point in the history
  • Loading branch information
petercr committed Oct 11, 2021
1 parent 4d403d2 commit d2ea734
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pages/404.js
Expand Up @@ -7,6 +7,13 @@ import Container from 'components/Container';

import styles from 'styles/pages/404.module.scss';

// Next.js method to ensure a static page gets rendered
export async function getStaticProps() {
return {
props: {},
};
}

export default function Custom404() {
return (
<Layout>
Expand Down
7 changes: 7 additions & 0 deletions src/pages/search.js
Expand Up @@ -6,6 +6,13 @@ import useSearch from 'hooks/use-search';

import TemplateArchive from 'templates/archive';

// Next.js method to ensure a static page gets rendered
export async function getStaticProps() {
return {
props: {},
};
}

export default function Search() {
const { query, results, search } = useSearch();
const title = 'Search';
Expand Down

0 comments on commit d2ea734

Please sign in to comment.