diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-31 16:20:18 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-31 16:20:18 +0700 |
| commit | 2cc01b5fec98eb4d02f3d695b783223664acb2ed (patch) | |
| tree | fa0753934550dae31d7d879d9bef492db6f19270 /src/pages/my | |
| parent | 3496025d97140268dc2e899adca994b5b9f343c0 (diff) | |
Fixing minor
Diffstat (limited to 'src/pages/my')
| -rw-r--r-- | src/pages/my/menu.js | 5 | ||||
| -rw-r--r-- | src/pages/my/wishlist.js | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/pages/my/menu.js b/src/pages/my/menu.js index 3de6f8a6..91d2d7c7 100644 --- a/src/pages/my/menu.js +++ b/src/pages/my/menu.js @@ -15,6 +15,7 @@ import { UserIcon, HeartIcon } from "@heroicons/react/24/outline"; +import WithAuth from "@/components/auth/WithAuth"; const Menu = ({ icon, name, url }) => { return ( @@ -32,7 +33,7 @@ export default function MyMenu() { const [auth] = useAuth(); return ( - <> + <WithAuth> <Layout> <AppBar title="Menu Utama" /> @@ -76,6 +77,6 @@ export default function MyMenu() { </div> </div> </Layout> - </> + </WithAuth> ); }
\ No newline at end of file diff --git a/src/pages/my/wishlist.js b/src/pages/my/wishlist.js index 9683c785..3d479802 100644 --- a/src/pages/my/wishlist.js +++ b/src/pages/my/wishlist.js @@ -1,4 +1,5 @@ import WithAuth from "@/components/auth/WithAuth"; +import Alert from "@/components/elements/Alert"; import Pagination from "@/components/elements/Pagination"; import Spinner from "@/components/elements/Spinner"; import AppBar from "@/components/layouts/AppBar"; @@ -38,6 +39,11 @@ export default function Wishlist() { { !wishlists && ( <Spinner className="w-6 h-6 text-gray-600 fill-gray-900 mx-auto" /> ) } + { wishlists?.products?.length == 0 && ( + <Alert type='info' className='text-center'> + Wishlist anda masih kosong + </Alert> + ) } <div className="grid grid-cols-2 gap-3"> {wishlists?.products.map((product) => ( <ProductCard key={product.id} data={product} /> |
