mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
feat: homepage and integrate with shopify page
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
@@ -15,7 +15,7 @@ export default async function Navbar() {
|
||||
const menu = await getMenu('main-menu');
|
||||
|
||||
return (
|
||||
<nav className="relative mb-4 flex items-center justify-between bg-white pb-3 pt-4 dark:bg-neutral-900 md:pb-0">
|
||||
<nav className="relative flex items-center justify-between bg-white pb-3 pt-4 dark:bg-neutral-900 md:pb-0">
|
||||
<div className="block flex-none pl-4 md:hidden">
|
||||
<Suspense fallback={null}>
|
||||
<MobileMenu menu={menu} />
|
||||
|
@@ -22,7 +22,7 @@ const MainMenu = ({ menu }: { menu: Menu[] }) => {
|
||||
if (!item.items.length) {
|
||||
return (
|
||||
<Link
|
||||
key={item.title}
|
||||
key={`navbar-${item.title}-${item.path}`}
|
||||
href={item.path}
|
||||
className={`flex h-full items-center ${isActiveItem ? 'text-black' : 'text-neutral-600 hover:text-black'}`}
|
||||
>
|
||||
@@ -33,7 +33,7 @@ const MainMenu = ({ menu }: { menu: Menu[] }) => {
|
||||
|
||||
const isOpen = open === item.path;
|
||||
return (
|
||||
<Popover key={item.title} className="relative flex h-full">
|
||||
<Popover key={`navbar-${item.title}-${item.path}`} className="relative flex h-full">
|
||||
<div
|
||||
className="relative flex"
|
||||
onMouseOver={() => setOpen(item.path)}
|
||||
@@ -69,7 +69,7 @@ const MainMenu = ({ menu }: { menu: Menu[] }) => {
|
||||
<div className="overflow-hidden rounded-md shadow-lg ring-1 ring-black/5">
|
||||
<ul className="flex flex-col space-y-3 bg-white px-4 py-3">
|
||||
{item.items.map((subItem: Menu) => (
|
||||
<li key={subItem.title}>
|
||||
<li key={`sub-nav-${subItem.title}-${subItem.path}`}>
|
||||
<Link
|
||||
href={subItem.path}
|
||||
className={`border-b ${subItem.path === pathname ? 'border-black text-black' : 'border-transparent text-neutral-600 hover:text-black'}`}
|
||||
|
Reference in New Issue
Block a user