summaryrefslogtreecommitdiff
path: root/src/core/components/elements/Navbar
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-04-11 09:47:25 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-04-11 09:47:25 +0700
commit92c2a229d9c9b510d71b928978872a8b107e9d5a (patch)
tree8d8161a49a0bdc46d4c28d3f2682bb485314a41d /src/core/components/elements/Navbar
parent62bebc1d33fd090d7666e18e7a0326ef7ef36897 (diff)
Documentation and refactor code
Diffstat (limited to 'src/core/components/elements/Navbar')
-rw-r--r--src/core/components/elements/Navbar/NavbarMobile.jsx12
-rw-r--r--src/core/components/elements/Navbar/Search.jsx10
2 files changed, 4 insertions, 18 deletions
diff --git a/src/core/components/elements/Navbar/NavbarMobile.jsx b/src/core/components/elements/Navbar/NavbarMobile.jsx
index 3998875b..24ff3a51 100644
--- a/src/core/components/elements/Navbar/NavbarMobile.jsx
+++ b/src/core/components/elements/Navbar/NavbarMobile.jsx
@@ -16,12 +16,7 @@ const NavbarMobile = () => {
<nav className='px-4 py-2 pb-3 sticky top-0 z-50 bg-white shadow'>
<div className='flex justify-between items-center mb-2'>
<Link href='/'>
- <Image
- src={IndoteknikLogo}
- alt='Indoteknik Logo'
- width={120}
- height={40}
- />
+ <Image src={IndoteknikLogo} alt='Indoteknik Logo' width={120} height={40} />
</Link>
<div className='flex gap-x-3'>
<Link href='/my/wishlist'>
@@ -30,10 +25,7 @@ const NavbarMobile = () => {
<Link href='/shop/cart'>
<ShoppingCartIcon className='w-6 text-gray_r-12' />
</Link>
- <button
- type='button'
- onClick={open}
- >
+ <button type='button' onClick={open}>
<Bars3Icon className='w-6 text-gray_r-12' />
</button>
</div>
diff --git a/src/core/components/elements/Navbar/Search.jsx b/src/core/components/elements/Navbar/Search.jsx
index d0627b24..3046782b 100644
--- a/src/core/components/elements/Navbar/Search.jsx
+++ b/src/core/components/elements/Navbar/Search.jsx
@@ -45,10 +45,7 @@ const Search = () => {
return (
<>
- <form
- onSubmit={handleSubmit}
- className='flex-1 flex relative'
- >
+ <form onSubmit={handleSubmit} className='flex-1 flex relative'>
<input
type='text'
ref={queryRef}
@@ -59,10 +56,7 @@ const Search = () => {
onBlur={onInputBlur}
onFocus={loadSuggestion}
/>
- <button
- type='submit'
- className='rounded-r border border-l-0 border-gray_r-6 px-2'
- >
+ <button type='submit' className='rounded-r border border-l-0 border-gray_r-6 px-2'>
<MagnifyingGlassIcon className='w-6' />
</button>