Files
medreport_mrb2b/app/store/[countryCode]/(main)/page.tsx
Danel Kungla 2e62e4b0eb move selfservice tables to medreport schema
add base medusa store frontend
2025-07-07 13:46:22 +03:00

41 lines
1007 B
TypeScript

import { Metadata } from 'next';
import { getRegion, listCollections } from '~/medusa/lib/data';
import FeaturedProducts from '~/medusa/modules/home/components/featured-products';
import Hero from '~/medusa/modules/home/components/hero';
export const metadata: Metadata = {
title: 'Medusa Next.js Starter Template',
description:
'A performant frontend ecommerce starter template with Next.js 15 and Medusa.',
};
export default async function Home(props: {
params: Promise<{ countryCode: string }>;
}) {
const params = await props.params;
const { countryCode } = params;
const region = await getRegion(countryCode);
const { collections } = await listCollections({
fields: 'id, handle, title',
});
if (!collections || !region) {
return null;
}
return (
<>
<Hero />
<div className="py-12">
<ul className="flex flex-col gap-x-6">
<FeaturedProducts collections={collections} region={region} />
</ul>
</div>
</>
);
}