mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Updates and architecture reorder
This commit is contained in:
@@ -1,22 +1,13 @@
|
||||
import { Featurebar, Button, Container } from "ui";
|
||||
import { Navbar, Footer } from "components";
|
||||
import { Layout } from "components";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<>
|
||||
<Featurebar
|
||||
title="Free Standard Shipping on orders over $99.99"
|
||||
description="Due to COVID-19, some orders may experience processing and delivery delays."
|
||||
/>
|
||||
<Navbar />
|
||||
<Container className="h-screen">
|
||||
<div className="grid grid-cols-1 h-full lg:grid-cols-3 lg:grid-rows-2">
|
||||
<div className="lg:row-span-2 lg:col-span-2 bg-violet h-full"></div>
|
||||
<div className="lg:row-span-1 lg:col-span-1 bg-black h-full"></div>
|
||||
<div className="lg:row-span-1 lg:col-span-1 bg-pink"></div>
|
||||
</div>
|
||||
</Container>
|
||||
<Footer></Footer>
|
||||
</>
|
||||
<Layout>
|
||||
<div className="h-full grid grid-cols-1 h-full lg:grid-cols-3 lg:grid-rows-2">
|
||||
<div className="lg:row-span-2 lg:col-span-2 bg-violet h-full"></div>
|
||||
<div className="lg:row-span-1 lg:col-span-1 bg-black h-full"></div>
|
||||
<div className="lg:row-span-1 lg:col-span-1 bg-pink"></div>
|
||||
</div>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { useRouter } from "next/router";
|
||||
import { Featurebar, Button, Container } from "ui";
|
||||
import { Navbar, Footer, ProductView } from "components";
|
||||
import { ProductView, Layout } from "components";
|
||||
import ErrorPage from "next/error";
|
||||
|
||||
export async function getStaticProps() {
|
||||
@@ -18,33 +17,26 @@ export async function getStaticProps() {
|
||||
props: {
|
||||
productData,
|
||||
},
|
||||
revalidate: 200,
|
||||
};
|
||||
}
|
||||
|
||||
export async function getStaticPaths() {
|
||||
return {
|
||||
paths: [],
|
||||
fallback: true,
|
||||
fallback: "unstable_blocking",
|
||||
};
|
||||
}
|
||||
|
||||
export default function Home({ productData }) {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<>
|
||||
<Featurebar
|
||||
title="Free Standard Shipping on orders over $99.99"
|
||||
description="Due to COVID-19, some orders may experience processing and delivery delays."
|
||||
/>
|
||||
<Navbar />
|
||||
<Container className="h-screen">
|
||||
{router.isFallback ? (
|
||||
<h1>Loading...</h1>
|
||||
) : (
|
||||
<ProductView productData={productData} />
|
||||
)}
|
||||
</Container>
|
||||
<Footer></Footer>
|
||||
</>
|
||||
<Layout>
|
||||
{router.isFallback ? (
|
||||
<h1>Loading...</h1>
|
||||
) : (
|
||||
<ProductView productData={productData} />
|
||||
)}
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user