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

Commit f69beb2

Browse files
committed
Export custom page query object
1 parent 4d340c1 commit f69beb2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import queryError404Page from '../pages/queryError404Page'
22
import processPostTypeQuery from './processPostTypeQuery'
33

4+
// Define single page query based on page name.
5+
export const customPageQuery = {
6+
404: queryError404Page
7+
}
8+
49
/**
510
* Retrieve single page set via Additional Settings.
611
*
@@ -9,13 +14,8 @@ import processPostTypeQuery from './processPostTypeQuery'
914
* @return {object} Object containing Apollo client instance and post data or error object.
1015
*/
1116
export default async function getSettingsCustomPage(page) {
12-
// Define single page query based on page name.
13-
const pageQuery = {
14-
404: queryError404Page
15-
}
16-
1717
// Retrieve page query.
18-
const query = pageQuery?.[page] ?? null
18+
const query = customPageQuery?.[page] ?? null
1919

2020
return processPostTypeQuery('page', page, query)
2121
}

0 commit comments

Comments
 (0)