4
0
forked from crowetic/commerce
Bel 172deeee86
Fixes & Updates (#704)
* Adding Dropdown Component

* Styling Issues

* Wishlist Fix

* Fixes for Wishlist View

* Hearts now work again

* Rollback ts

* Removing extra config to disable BigCommerce

* Fixes for Wishlist View

* Remove transition/animation for mobile

* New Updates.

* New Updates.

* Dropdown fix

* Polish

* export

* export

* revert tsconfig

Co-authored-by: Luis Alvarez D. <luis@vercel.com>

Co-authored-by: Dom Sip <dom@vercel.com>
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
2022-03-16 12:05:58 +01:00

43 lines
1.0 KiB
TypeScript

import Link from 'next/link'
import s from './MenuSidebarView.module.css'
import { useUI } from '@components/ui/context'
import SidebarLayout from '@components/common/SidebarLayout'
import type { Link as LinkProps } from './index'
export default function MenuSidebarView({
links = [],
}: {
links?: LinkProps[]
}) {
const { closeSidebar } = useUI()
return (
<SidebarLayout handleClose={() => closeSidebar()}>
<div className={s.root}>
<nav>
<ul>
<li className={s.item} onClick={() => closeSidebar()}>
<Link href="/search">
<a>All</a>
</Link>
</li>
{links.map((l: any) => (
<li
key={l.href}
className={s.item}
onClick={() => closeSidebar()}
>
<Link href={l.href}>
<a>{l.label}</a>
</Link>
</li>
))}
</ul>
</nav>
</div>
</SidebarLayout>
)
}
MenuSidebarView