Skip to content

Commit

Permalink
CmsBlock for Home
Browse files Browse the repository at this point in the history
(cherry picked from commit 24c8bb7)
  • Loading branch information
fnhipster committed Nov 11, 2020
1 parent 2c27bca commit 5e21e67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions components/App/graphql/App.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ query AppQuery {
baseMediaUrl: base_media_url
categoryUrlSuffix: category_url_suffix
copyright
homePage: cms_home_page
logoAlt: logo_alt
logoSrc: header_logo_src
metaDescription: default_description
Expand All @@ -24,7 +23,7 @@ query AppQuery {
googleMapsApiKey: storystore_pwa_google_maps_api_key

# Content
homePage: storystore_pwa_home_page
homePage: cms_home_page
footerBlockId: storystore_pwa_footer_block

# Colors
Expand Down
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Home.getInitialProps = async ({ req, res }) => {

const app = await apolloClient.query({ query: APP_QUERY, errorPolicy: 'all' }) // Preload App Data

const homePage = app.data?.storyStore.homePage || app.data?.storeConfig.homePage
const homePage = app.data?.storyStore.homePage

await apolloClient.query({ query: HOME_PAGE_QUERY, variables: { id: homePage }, errorPolicy: 'all' })

Expand Down

0 comments on commit 5e21e67

Please sign in to comment.