add product route, separate layouts between home & pages

This commit is contained in:
andr-ew
2023-06-21 18:53:04 -05:00
parent c174b6ad79
commit f0187e9f7a
7 changed files with 45 additions and 9 deletions

View File

@@ -0,0 +1,13 @@
import { getCollections } from 'lib/shopify';
import { HomeProductsList } from '/components/home.js';
export async function generateStaticParams() {
const collections = await getCollections();
return collections.map(collection => ({ collection: collection.handle }));
}
export default async function CollectionPage({ params: { collection } }) {
return <HomeProductsList collection={collection} />;
}