diff options
Diffstat (limited to 'src/core/components')
| -rw-r--r-- | src/core/components/elements/Navbar/NavbarUserDropdown.jsx | 20 | ||||
| -rw-r--r-- | src/core/components/elements/Popup/BottomPopup.jsx | 4 | ||||
| -rw-r--r-- | src/core/components/elements/Skeleton/PriceSkeleton.jsx | 9 |
3 files changed, 25 insertions, 8 deletions
diff --git a/src/core/components/elements/Navbar/NavbarUserDropdown.jsx b/src/core/components/elements/Navbar/NavbarUserDropdown.jsx index b735c13f..1d2429a7 100644 --- a/src/core/components/elements/Navbar/NavbarUserDropdown.jsx +++ b/src/core/components/elements/Navbar/NavbarUserDropdown.jsx @@ -1,17 +1,25 @@ import { deleteAuth } from '@/core/utils/auth' import Link from '../Link/Link' +import { useRouter } from 'next/router' const NavbarUserDropdown = () => { + const router = useRouter() + + const logout = () => { + deleteAuth() + router.push('/login') + } + return ( <div className='navbar-user-dropdown-wrapper'> <div className='navbar-user-dropdown'> - <Link href='/'>Daftar Transaksi</Link> - <Link href='/'>Invoice & Faktur Pajak</Link> - <Link href='/'>Wishlist</Link> - <Link href='/'>Pengaturan Akun</Link> - <Link href='/login' onClick={deleteAuth}> + <Link href='/my/transactions'>Daftar Transaksi</Link> + <Link href='/my/invoices'>Invoice & Faktur Pajak</Link> + <Link href='/my/wishlist'>Wishlist</Link> + <Link href='/my/address'>Daftar Alamat</Link> + <button type='button' onClick={logout}> Keluar Akun - </Link> + </button> </div> </div> ) diff --git a/src/core/components/elements/Popup/BottomPopup.jsx b/src/core/components/elements/Popup/BottomPopup.jsx index 95c75473..c244330c 100644 --- a/src/core/components/elements/Popup/BottomPopup.jsx +++ b/src/core/components/elements/Popup/BottomPopup.jsx @@ -49,8 +49,8 @@ const BottomPopup = ({ children, active = false, title, close }) => { <DesktopView> <motion.div initial={{ bottom: '35%', opacity: 0 }} - animate={{ bottom: '50%', opacity: 1 }} - exit={{ bottom: '35%', opacity: 0 }} + animate={{ bottom: '30%', opacity: 1 }} + exit={{ bottom: '25%', opacity: 0 }} transition={transition} className='fixed left-1/2 -translate-x-1/2 w-2/5 border border-gray_r-6 rounded-xl z-[60] p-4 pt-0 bg-white' > diff --git a/src/core/components/elements/Skeleton/PriceSkeleton.jsx b/src/core/components/elements/Skeleton/PriceSkeleton.jsx new file mode 100644 index 00000000..0dc4c70f --- /dev/null +++ b/src/core/components/elements/Skeleton/PriceSkeleton.jsx @@ -0,0 +1,9 @@ +const PriceSkeleton = () => ( + <div role='status' className='max-w-sm rounded animate-pulse my-2'> + <div className='h-2.5 bg-gray_r-6 rounded-full w-3/12 mb-1'></div> + <div className='h-2.5 bg-gray_r-6 rounded-full w-6/12 mb-1'></div> + <span className='sr-only'>Loading...</span> + </div> +) + +export default PriceSkeleton |
