Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 1ed3c99

Browse files
committed
update 404 to match updated acf settings and slug
1 parent b248117 commit 1ed3c99

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

api/wordpress/pages/queryError404Page.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import {gql} from '@apollo/client'
2-
import {singlePageFragment} from './queryPageById'
32
import defaultPageData from '../_partials/defaultPageData'
3+
import {singlePageFragment} from './queryPageById'
44

55
// Query: retrieve 404 error page.
66
const queryError404Page = gql`
77
query GET_ERROR_404_PAGE($imageSize: MediaItemSizeEnum = LARGE) {
88
${defaultPageData}
9-
additionalSettings {
9+
headlessConfig {
1010
additionalSettings {
11-
page: error404Page {
11+
error404Page {
1212
... on Page {
1313
...SinglePageFields
1414
}

pages/404.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import getPostTypeStaticProps from '@/api/wordpress/_global/getPostTypeStaticProps'
2+
import Container from '@/components/atoms/Container'
23
import Layout from '@/components/common/Layout'
34
import getPagePropTypes from '@/functions/getPagePropTypes'
45
import Page from './[...slug]'
5-
import Container from '@/components/atoms/Container'
66

77
// Define route post type.
88
const postType = 'page'
@@ -46,7 +46,7 @@ export default function Custom404({post}) {
4646
* @return {object} Post props.
4747
*/
4848
export async function getStaticProps() {
49-
return await getPostTypeStaticProps({slug: '404'}, postType)
49+
return await getPostTypeStaticProps({slug: '404-not-found'}, postType)
5050
}
5151

5252
Custom404.propTypes = {

0 commit comments

Comments
 (0)