Skip to content

Commit

Permalink
Added a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lfades committed Oct 30, 2020
1 parent c70a965 commit b06dca4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/usage-warns.ts
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
2 changes: 1 addition & 1 deletion pages/[...pages].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b06dca4

Please sign in to comment.