diff --git a/lib/usage-warns.ts b/lib/usage-warns.ts index a81b6dc09..aa77f6304 100644 --- a/lib/usage-warns.ts +++ b/lib/usage-warns.ts @@ -1,8 +1,12 @@ +/** + * The utils here are used to help developers use the example + */ + export function missingLocaleInPages(): [string[], () => void] { const invalidPaths: string[] = [] const log = () => { if (invalidPaths.length) { - const single = invalidPaths.length === 0 + const single = invalidPaths.length === 1 const pages = single ? 'page' : 'pages' console.log( diff --git a/pages/[...pages].tsx b/pages/[...pages].tsx index ccd59932a..1457484fd 100644 --- a/pages/[...pages].tsx +++ b/pages/[...pages].tsx @@ -7,8 +7,8 @@ import { getConfig } from '@bigcommerce/storefront-data-hooks/api' import getPage from '@bigcommerce/storefront-data-hooks/api/operations/get-page' import getAllPages from '@bigcommerce/storefront-data-hooks/api/operations/get-all-pages' import getSlug from '@lib/get-slug' -import { Layout, HTMLContent } from '@components/core' import { missingLocaleInPages } from '@lib/usage-warns' +import { Layout, HTMLContent } from '@components/core' export async function getStaticProps({ preview,