forked from crowetic/commerce
Fix Typo (#151)
* Fix typo (#135) The defaultPageProps object had a typo in the name Co-authored-by: B <curciobelen@gmail.com> * changes * changes Co-authored-by: JD <jonathan.dawber@icloud.com>
This commit is contained in:
parent
66b8bdb6bb
commit
8698794c96
@ -1,6 +1,6 @@
|
|||||||
// Fallback to CMS Data
|
// Fallback to CMS Data
|
||||||
|
|
||||||
export const defatultPageProps = {
|
export const defaultPageProps = {
|
||||||
header: {
|
header: {
|
||||||
links: [
|
links: [
|
||||||
{
|
{
|
||||||
|
@ -3,14 +3,14 @@ import type {
|
|||||||
GetStaticPropsContext,
|
GetStaticPropsContext,
|
||||||
InferGetStaticPropsType,
|
InferGetStaticPropsType,
|
||||||
} from 'next'
|
} from 'next'
|
||||||
|
import { Text } from '@components/ui'
|
||||||
|
import { Layout } from '@components/common'
|
||||||
import getSlug from '@lib/get-slug'
|
import getSlug from '@lib/get-slug'
|
||||||
import { missingLocaleInPages } from '@lib/usage-warns'
|
import { missingLocaleInPages } from '@lib/usage-warns'
|
||||||
import { Layout } from '@components/common'
|
|
||||||
import { Text } from '@components/ui'
|
|
||||||
import { getConfig } from '@framework/api'
|
import { getConfig } from '@framework/api'
|
||||||
import getPage from '@framework/api/operations/get-page'
|
import getPage from '@framework/api/operations/get-page'
|
||||||
import getAllPages from '@framework/api/operations/get-all-pages'
|
import getAllPages from '@framework/api/operations/get-all-pages'
|
||||||
import { defatultPageProps } from '@lib/defaults'
|
import { defaultPageProps } from '@lib/defaults'
|
||||||
|
|
||||||
export async function getStaticProps({
|
export async function getStaticProps({
|
||||||
preview,
|
preview,
|
||||||
@ -34,7 +34,7 @@ export async function getStaticProps({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: { ...defatultPageProps, pages, page },
|
props: { ...defaultPageProps, pages, page },
|
||||||
revalidate: 60 * 60, // Every hour
|
revalidate: 60 * 60, // Every hour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
import Document, {
|
import Document, { Head, Html, Main, NextScript } from 'next/document'
|
||||||
DocumentContext,
|
|
||||||
Head,
|
|
||||||
Html,
|
|
||||||
Main,
|
|
||||||
NextScript,
|
|
||||||
} from 'next/document'
|
|
||||||
|
|
||||||
class MyDocument extends Document {
|
class MyDocument extends Document {
|
||||||
render() {
|
render() {
|
||||||
|
@ -6,7 +6,7 @@ import { Layout } from '@components/common'
|
|||||||
import { Heart } from '@components/icons'
|
import { Heart } from '@components/icons'
|
||||||
import { Text, Container } from '@components/ui'
|
import { Text, Container } from '@components/ui'
|
||||||
import { WishlistCard } from '@components/wishlist'
|
import { WishlistCard } from '@components/wishlist'
|
||||||
import { defatultPageProps } from '@lib/defaults'
|
import { defaultPageProps } from '@lib/defaults'
|
||||||
|
|
||||||
export async function getStaticProps({
|
export async function getStaticProps({
|
||||||
preview,
|
preview,
|
||||||
@ -15,7 +15,7 @@ export async function getStaticProps({
|
|||||||
const config = getConfig({ locale })
|
const config = getConfig({ locale })
|
||||||
const { pages } = await getAllPages({ config, preview })
|
const { pages } = await getAllPages({ config, preview })
|
||||||
return {
|
return {
|
||||||
props: { ...defatultPageProps, pages },
|
props: { ...defaultPageProps, pages },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user