From 3fb8fffa7ba62c0dd4de5645b6622755bdf22090 Mon Sep 17 00:00:00 2001 From: Bel Curcio Date: Tue, 15 Mar 2022 19:36:35 +0100 Subject: [PATCH] Polish --- site/components/common/Layout/Layout.tsx | 6 ++-- .../common/SidebarLayout/SidebarLayout.tsx | 2 +- .../CustomerMenuContent.module.css | 34 ++++++++----------- .../CustomerMenuContent.tsx | 21 ++---------- 4 files changed, 21 insertions(+), 42 deletions(-) diff --git a/site/components/common/Layout/Layout.tsx b/site/components/common/Layout/Layout.tsx index f9956f063..6dda880e4 100644 --- a/site/components/common/Layout/Layout.tsx +++ b/site/components/common/Layout/Layout.tsx @@ -83,9 +83,9 @@ const SidebarView: React.FC<{ return ( {sidebarView === 'CART_VIEW' && } - {sidebarView === 'CHECKOUT_VIEW' && } - {sidebarView === 'PAYMENT_VIEW' && } {sidebarView === 'SHIPPING_VIEW' && } + {sidebarView === 'PAYMENT_VIEW' && } + {sidebarView === 'CHECKOUT_VIEW' && } {sidebarView === 'MOBILE_MENU_VIEW' && } ) @@ -95,9 +95,9 @@ const SidebarUI: React.FC<{ links: LinkProps[] }> = ({ links }) => { const { displaySidebar, closeSidebar, sidebarView } = useUI() return displaySidebar ? ( ) : null } diff --git a/site/components/common/SidebarLayout/SidebarLayout.tsx b/site/components/common/SidebarLayout/SidebarLayout.tsx index dd994e9aa..b291e8a68 100644 --- a/site/components/common/SidebarLayout/SidebarLayout.tsx +++ b/site/components/common/SidebarLayout/SidebarLayout.tsx @@ -12,8 +12,8 @@ type ComponentProps = { className?: string } & ( const SidebarLayout: FC = ({ children, className, - handleClose, handleBack, + handleClose, }) => { return (
diff --git a/site/components/common/UserNav/CustomerMenuContent/CustomerMenuContent.module.css b/site/components/common/UserNav/CustomerMenuContent/CustomerMenuContent.module.css index 11bc84853..93a183a2b 100644 --- a/site/components/common/UserNav/CustomerMenuContent/CustomerMenuContent.module.css +++ b/site/components/common/UserNav/CustomerMenuContent/CustomerMenuContent.module.css @@ -1,18 +1,3 @@ -.link { - @apply text-primary flex cursor-pointer px-6 py-3 - transition ease-in-out duration-150 leading-6 - font-medium items-center capitalize w-full box-border - outline-0; -} - -.link:hover { - @apply bg-accent-1 outline-none; -} - -.link.active { - @apply font-bold bg-accent-2; -} - .root { @apply inset-0 fixed; left: 72px; @@ -22,10 +7,6 @@ transition: none; } -.placeholder { - height: 68px; -} - @media screen(lg) { .root { @apply static; @@ -33,3 +14,18 @@ height: inherit; } } + +.link { + @apply text-primary flex cursor-pointer px-6 py-3 + transition ease-in-out duration-150 leading-6 + font-medium items-center capitalize w-full box-border + outline-0; +} + +.link:hover { + @apply bg-accent-1 outline-none; +} + +.link.active { + @apply font-bold bg-accent-2; +} diff --git a/site/components/common/UserNav/CustomerMenuContent/CustomerMenuContent.tsx b/site/components/common/UserNav/CustomerMenuContent/CustomerMenuContent.tsx index d576e769c..992d17178 100644 --- a/site/components/common/UserNav/CustomerMenuContent/CustomerMenuContent.tsx +++ b/site/components/common/UserNav/CustomerMenuContent/CustomerMenuContent.tsx @@ -1,15 +1,12 @@ import cn from 'clsx' import { useTheme } from 'next-themes' import { useRouter } from 'next/router' -import { UserNav } from '@components/common' -import { Moon, Sun, Cross } from '@components/icons' +import { Moon, Sun } from '@components/icons' import s from './CustomerMenuContent.module.css' import useLogout from '@framework/auth/use-logout' import { - Dropdown as DropdownRoot, - DropdownMenuItem, DropdownContent, - DropdownTrigger, + DropdownMenuItem, } from '@components/ui/Dropdown/Dropdown' const LINKS = [ @@ -27,8 +24,6 @@ const LINKS = [ }, ] -export const Dropdown = - export default function CustomerMenuContent() { const router = useRouter() const logout = useLogout() @@ -47,18 +42,6 @@ export default function CustomerMenuContent() { className={s.root} id="CustomerMenuContent" > - {/*
- -
- -
-
*/} {LINKS.map(({ name, href }) => (