summaryrefslogtreecommitdiff
path: root/src/core/components
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-02-22 08:35:08 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-02-22 08:35:08 +0700
commit50f5a2d8897020acc11f2a20469ffdd42ca7c31b (patch)
treed47f95de1d9710ca8b4d173abd5edc2797704a87 /src/core/components
parent82954ee3cfa38f21f677b9aa2c1c6c3c88004050 (diff)
parent036e72780ddb7a510795b329919ff9dd957af6d7 (diff)
Merge branch 'refactor' of bitbucket.org:altafixco/next-indoteknik into refactor
Diffstat (limited to 'src/core/components')
-rw-r--r--src/core/components/elements/Image/Image.jsx16
-rw-r--r--src/core/components/elements/Navbar/Navbar.jsx4
-rw-r--r--src/core/components/elements/Sidebar/Sidebar.jsx8
3 files changed, 15 insertions, 13 deletions
diff --git a/src/core/components/elements/Image/Image.jsx b/src/core/components/elements/Image/Image.jsx
index 579660a4..a6f0b00c 100644
--- a/src/core/components/elements/Image/Image.jsx
+++ b/src/core/components/elements/Image/Image.jsx
@@ -2,13 +2,15 @@ import { LazyLoadImage } from "react-lazy-load-image-component"
import "react-lazy-load-image-component/src/effects/opacity.css"
const Image = ({ ...props }) => (
- <LazyLoadImage
- { ...props }
- src={props.src || '/images/noimage.jpeg'}
- placeholderSrc="/images/indoteknik-placeholder.png"
- alt={props.src ? props.alt : 'Image Not Found - Indoteknik'}
- wrapperClassName="bg-white"
- />
+ <>
+ <LazyLoadImage
+ { ...props }
+ src={props.src || '/images/noimage.jpeg'}
+ placeholderSrc="/images/indoteknik-placeholder.png"
+ alt={props.src ? props.alt : 'Image Not Found - Indoteknik'}
+ wrapperClassName="bg-white"
+ />
+ </>
)
Image.defaultProps = LazyLoadImage.defaultProps
diff --git a/src/core/components/elements/Navbar/Navbar.jsx b/src/core/components/elements/Navbar/Navbar.jsx
index 99fdc446..f10ebd63 100644
--- a/src/core/components/elements/Navbar/Navbar.jsx
+++ b/src/core/components/elements/Navbar/Navbar.jsx
@@ -17,9 +17,9 @@ const Navbar = () => {
<Image src={IndoteknikLogo} alt="Indoteknik Logo" width={120} height={40} />
</Link>
<div className="flex gap-x-3">
- <button type="button">
+ <Link href="/my/wishlist">
<HeartIcon className="w-6 text-gray_r-12" />
- </button>
+ </Link>
<Link href="/shop/cart">
<ShoppingCartIcon className="w-6 text-gray_r-12" />
</Link>
diff --git a/src/core/components/elements/Sidebar/Sidebar.jsx b/src/core/components/elements/Sidebar/Sidebar.jsx
index 88de1c1c..48ceacf6 100644
--- a/src/core/components/elements/Sidebar/Sidebar.jsx
+++ b/src/core/components/elements/Sidebar/Sidebar.jsx
@@ -1,8 +1,8 @@
import Link from "../Link/Link"
import greeting from "@/core/utils/greeting"
-import { Cog6ToothIcon } from "@heroicons/react/24/solid"
import useAuth from "@/core/hooks/useAuth"
import { AnimatePresence, motion } from "framer-motion"
+import { CogIcon } from "@heroicons/react/24/outline"
const Sidebar = ({
active,
@@ -44,8 +44,8 @@ const Sidebar = ({
<div className="p-4 flex gap-x-3">
{ !auth && (
<>
- <Link href="/register" className="btn-yellow !text-gray_r-12 py-2 flex-1">Daftar</Link>
- <Link href="/login" className="btn-solid-red !text-gray_r-1 py-2 flex-1">Masuk</Link>
+ <Link onClick={close} href="/register" className="btn-yellow !text-gray_r-12 py-2 flex-1">Daftar</Link>
+ <Link onClick={close} href="/login" className="btn-solid-red !text-gray_r-1 py-2 flex-1">Masuk</Link>
</>
) }
{ auth && (
@@ -61,7 +61,7 @@ const Sidebar = ({
href="/my/menu"
className="!text-gray_r-11 ml-auto my-auto"
>
- <Cog6ToothIcon className="w-6" />
+ <CogIcon className="w-6" />
</Link>
</>
) }