forked from crowetic/commerce
More changes
This commit is contained in:
parent
dbc0091732
commit
3b5ac2df1f
@ -97,15 +97,17 @@ const CartItem = ({
|
|||||||
<button type="button" onClick={() => increaseQuantity(-1)}>
|
<button type="button" onClick={() => increaseQuantity(-1)}>
|
||||||
<Minus width={18} height={18} />
|
<Minus width={18} height={18} />
|
||||||
</button>
|
</button>
|
||||||
<input
|
<label>
|
||||||
type="number"
|
<input
|
||||||
max={99}
|
type="number"
|
||||||
min={0}
|
max={99}
|
||||||
className={s.quantity}
|
min={0}
|
||||||
value={quantity}
|
className={s.quantity}
|
||||||
onChange={handleQuantity}
|
value={quantity}
|
||||||
onBlur={handleBlur}
|
onChange={handleQuantity}
|
||||||
/>
|
onBlur={handleBlur}
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
<button type="button" onClick={() => increaseQuantity(1)}>
|
<button type="button" onClick={() => increaseQuantity(1)}>
|
||||||
<Plus width={18} height={18} />
|
<Plus width={18} height={18} />
|
||||||
</button>
|
</button>
|
||||||
|
@ -42,7 +42,7 @@ const Navbar: FC<Props> = ({ className }) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex pb-4 lg:px-6 lg:hidden">
|
<div className="flex pb-4 lg:px-6 lg:hidden">
|
||||||
<Searchbar id="mobileSearch" />
|
<Searchbar />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -22,29 +22,31 @@ const Searchbar: FC<Props> = ({ className, id = 'search' }) => {
|
|||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<label>
|
<label className="hidden" htmlFor={id}>
|
||||||
<input
|
Search
|
||||||
className={s.input}
|
|
||||||
placeholder="Search for products..."
|
|
||||||
defaultValue={router.query.q}
|
|
||||||
onKeyUp={(e) => {
|
|
||||||
e.preventDefault()
|
|
||||||
|
|
||||||
if (e.key === 'Enter') {
|
|
||||||
const q = e.currentTarget.value
|
|
||||||
|
|
||||||
router.push(
|
|
||||||
{
|
|
||||||
pathname: `/search`,
|
|
||||||
query: q ? { q } : {},
|
|
||||||
},
|
|
||||||
undefined,
|
|
||||||
{ shallow: true }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</label>
|
</label>
|
||||||
|
<input
|
||||||
|
id={id}
|
||||||
|
className={s.input}
|
||||||
|
placeholder="Search for products..."
|
||||||
|
defaultValue={router.query.q}
|
||||||
|
onKeyUp={(e) => {
|
||||||
|
e.preventDefault()
|
||||||
|
|
||||||
|
if (e.key === 'Enter') {
|
||||||
|
const q = e.currentTarget.value
|
||||||
|
|
||||||
|
router.push(
|
||||||
|
{
|
||||||
|
pathname: `/search`,
|
||||||
|
query: q ? { q } : {},
|
||||||
|
},
|
||||||
|
undefined,
|
||||||
|
{ shallow: true }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<div className={s.iconContainer}>
|
<div className={s.iconContainer}>
|
||||||
<svg className={s.icon} fill="currentColor" viewBox="0 0 20 20">
|
<svg className={s.icon} fill="currentColor" viewBox="0 0 20 20">
|
||||||
<path
|
<path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user