diff --git a/README.md b/README.md index 935c433cf..e73a9747e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Demo live at: [demo.vercel.store](https://demo.vercel.store/) This project is currently under development. -## Goals and Features +## Features - Performant by default - SEO Ready @@ -22,14 +22,24 @@ This project is currently under development. - Dark Mode Support ## Work in progress - We're using Github Projects to keep track of issues in progress and todo's. Here is our [Board](https://github.com/vercel/commerce/projects/1) ## Integrations - Next.js Commerce integrates out-of-the-box with BigCommerce. We plan to support all major ecommerce backends. -If you wish to work on a new cms/headless ecommerce provider, please check this repo https://github.com/vercel/commerce-framework and open a PR with your functions and utilities under the standard mentioned in the README. + +## Goals + +* **Next.js Commerce** should have a completely data **agnostic** UI +* **Aware of schema**: should ship with the right data schemas and types. +* All providers should return the right data types and schemas to blend correctly with Next.js Commerce. +* `@framework` will be the alias utilized in commerce and it will map to the ecommerce provider of preference- e.g BigCommerce, Shopify, Swell. All providers should expose the same standardized functions. _Note that the same applies for recipes using a CMS + an ecommerce provider._ + +There is a `framework` folder in the root folder that will contain multiple ecommerce providers. + +Additionally, we need to ensure feature parity (not all providers have e.g. wishlist) we will also have to build a feature API to disable/enable features in the UI. + +People actively working on this project: @okbel & @lfades. ## Troubleshoot @@ -80,20 +90,9 @@ Our commitment to Open Source can be found [here](https://vercel.com/oss). 6. Add proper store values to `.env.local`. 7. Run `yarn dev` to build and watch for code changes 8. The development branch is `development` (this is the branch pull requests should be made against). - On a release, the relevant parts of the changes in the `staging` branch are rebased into `master`. - -## Goals - -* **Next.js Commerce** should have a completely data **agnostic** UI -* **Aware of schema**: should ship with the right data schemas and types. -* All providers should return the right data types and schemas to blend correctly with Next.js Commerce. -* `@framework` will be the alias utilized in commerce and it will map to the ecommerce provider of preference- e.g BigCommerce, Shopify, Swell. All providers should expose the same standardized functions. _Note that the same applies for recipes using a CMS + an ecommerce provider._ - -There is a `framework` folder in the root folder that will contain multiple ecommerce providers. - -Additionally, we need to ensure feature parity (not all providers have e.g. wishlist) we will also have to build a feature API to disable/enable features in the UI. - -People actively working on this project: @okbel & @lfades. + On a release, `develop` branch is rebased into `master`. + + 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..6caac1720 100644 --- a/pages/[...pages].tsx +++ b/pages/[...pages].tsx @@ -3,14 +3,14 @@ import type { GetStaticPropsContext, InferGetStaticPropsType, } from 'next' +import { Text } from '@components/ui' +import { Layout } from '@components/common' 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' +import { defaultPageProps } from '@lib/defaults' export async function getStaticProps({ preview, @@ -34,7 +34,7 @@ export async function getStaticProps({ } return { - props: { ...defatultPageProps, pages, page }, + props: { ...defaultPageProps, pages, page }, revalidate: 60 * 60, // Every hour } } diff --git a/pages/_document.tsx b/pages/_document.tsx index c2baf322e..dcd214e4f 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -1,10 +1,4 @@ -import Document, { - DocumentContext, - Head, - Html, - Main, - NextScript, -} from 'next/document' +import Document, { Head, Html, Main, NextScript } from 'next/document' class MyDocument extends Document { render() { 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 }, } }