-
Notifications
You must be signed in to change notification settings - Fork 132
/
index.js
37 lines (32 loc) · 1.63 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { getProductsInCollection } from "../lib/shopify"
import ProductList from "../components/ProductList"
import Hero from "../components/Hero"
import Head from 'next/head'
export default function Home({ products }) {
return (
<div className="">
<Head>
<title>Modern eCommerce Course</title>
<meta httpEquiv="Content-Type" content="text/html; charset=utf-8" />
<meta httpEquiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="description" content="Modern eCommerce Development Course focusing on Shopify, Next.js, TailwindCSS, GraphQL. Additional topics include Storefront API, Static Site Generation, getStaticPaths, getStaticProps and more." />
<meta property="og:title" content="Modern eCommerce Course" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.buildnextshop.com" />
<meta property="og:image" content="https://www.buildnextshop.com/share.png" />
<meta property="og:description"
content="Modern eCommerce Development Course focusing on Shopify, Next.js, TailwindCSS, GraphQL. Additional topics include Storefront API, Static Site Generation, getStaticPaths, getStaticProps and more." />
<meta property="og:locale" content="en_US" />
<meta property="og:site_name" content="Modern eCommerce Course" />
</Head>
<Hero />
<ProductList products={products} />
</div>
)
}
export async function getStaticProps() {
const products = await getProductsInCollection()
return {
props: { products }, // will be passed to the page component as props
}
}