From e017f4ba7e3f8caa29bd706c6177a291191532a0 Mon Sep 17 00:00:00 2001 From: JD Date: Sat, 9 Jan 2021 15:20:56 +0000 Subject: [PATCH] Fix typo (#135) The defaultPageProps object had a typo in the name Co-authored-by: B --- lib/defaults.ts | 2 +- pages/[...pages].tsx | 4 +++- pages/wishlist.tsx | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/defaults.ts b/lib/defaults.ts index db0503a7a..e74227732 100644 --- a/lib/defaults.ts +++ b/lib/defaults.ts @@ -1,6 +1,6 @@ // Fallback to CMS Data -export const defatultPageProps = { +export const defaultPageProps = { header: { links: [ { diff --git a/pages/[...pages].tsx b/pages/[...pages].tsx index b90af8b6f..5d113b58f 100644 --- a/pages/[...pages].tsx +++ b/pages/[...pages].tsx @@ -7,11 +7,13 @@ import getSlug from '@lib/get-slug' import { missingLocaleInPages } from '@lib/usage-warns' import { Layout } from '@components/common' import { Text } from '@components/ui' + import { getConfig } from '@framework/api' import getPage from '@framework/api/operations/get-page' import getAllPages from '@framework/api/operations/get-all-pages' import { defatultPageProps } from '@lib/defaults' + export async function getStaticProps({ preview, params, @@ -34,7 +36,7 @@ export async function getStaticProps({ } return { - props: { ...defatultPageProps, pages, page }, + props: { ...defaultPageProps, pages, page }, revalidate: 60 * 60, // Every hour } } diff --git a/pages/wishlist.tsx b/pages/wishlist.tsx index b52c78d47..a2337490b 100644 --- a/pages/wishlist.tsx +++ b/pages/wishlist.tsx @@ -6,7 +6,7 @@ import { Layout } from '@components/common' import { Heart } from '@components/icons' import { Text, Container } from '@components/ui' import { WishlistCard } from '@components/wishlist' -import { defatultPageProps } from '@lib/defaults' +import { defaultPageProps } from '@lib/defaults' export async function getStaticProps({ preview, @@ -15,7 +15,7 @@ export async function getStaticProps({ const config = getConfig({ locale }) const { pages } = await getAllPages({ config, preview }) return { - props: { ...defatultPageProps, pages }, + props: { ...defaultPageProps, pages }, } }