forked from crowetic/commerce
Added a comment
This commit is contained in:
parent
c70a965c7d
commit
b06dca4243
@ -1,8 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* The utils here are used to help developers use the example
|
||||||
|
*/
|
||||||
|
|
||||||
export function missingLocaleInPages(): [string[], () => void] {
|
export function missingLocaleInPages(): [string[], () => void] {
|
||||||
const invalidPaths: string[] = []
|
const invalidPaths: string[] = []
|
||||||
const log = () => {
|
const log = () => {
|
||||||
if (invalidPaths.length) {
|
if (invalidPaths.length) {
|
||||||
const single = invalidPaths.length === 0
|
const single = invalidPaths.length === 1
|
||||||
const pages = single ? 'page' : 'pages'
|
const pages = single ? 'page' : 'pages'
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
|
@ -7,8 +7,8 @@ import { getConfig } from '@bigcommerce/storefront-data-hooks/api'
|
|||||||
import getPage from '@bigcommerce/storefront-data-hooks/api/operations/get-page'
|
import getPage from '@bigcommerce/storefront-data-hooks/api/operations/get-page'
|
||||||
import getAllPages from '@bigcommerce/storefront-data-hooks/api/operations/get-all-pages'
|
import getAllPages from '@bigcommerce/storefront-data-hooks/api/operations/get-all-pages'
|
||||||
import getSlug from '@lib/get-slug'
|
import getSlug from '@lib/get-slug'
|
||||||
import { Layout, HTMLContent } from '@components/core'
|
|
||||||
import { missingLocaleInPages } from '@lib/usage-warns'
|
import { missingLocaleInPages } from '@lib/usage-warns'
|
||||||
|
import { Layout, HTMLContent } from '@components/core'
|
||||||
|
|
||||||
export async function getStaticProps({
|
export async function getStaticProps({
|
||||||
preview,
|
preview,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user