This commit is contained in:
@@ -11,8 +11,7 @@ import {
|
||||
selectIsDrawerOpen,
|
||||
closeDrawer,
|
||||
removeFromCart,
|
||||
incrementQty,
|
||||
decrementQty,
|
||||
setQuantity,
|
||||
} from '@/store/cartSlice';
|
||||
import {useLanguage} from '@/app/context/LanguageContext';
|
||||
import api from "@/lib/axios";
|
||||
@@ -77,10 +76,10 @@ export default function CartDrawer() {
|
||||
<InputNumber
|
||||
size="small"
|
||||
min={1}
|
||||
precision={0}
|
||||
value={item.qty}
|
||||
onChange={(val) => {
|
||||
if (val > item.qty) dispatch(incrementQty(item.id));
|
||||
else if (val < item.qty) dispatch(decrementQty(item.id));
|
||||
if (val !== null) dispatch(setQuantity({id: item.id, qty: val}));
|
||||
}}
|
||||
className="w-16"
|
||||
/>
|
||||
|
||||
+11
-5
@@ -80,16 +80,15 @@ export default function Header() {
|
||||
{t.nav.login}
|
||||
</Button>
|
||||
|
||||
{/* faz 1 */}
|
||||
{/* <Badge count={cartCount} size="small" offset={[-2, 2]}>
|
||||
<Badge count={cartCount} size="small" offset={[-2, 2]}>
|
||||
<Button
|
||||
shape="circle"
|
||||
size="large"
|
||||
icon={<ShoppingCartOutlined/>}
|
||||
onClick={() => dispatch(openDrawer())}
|
||||
aria-label="cart"
|
||||
aria-label={t.cart.title}
|
||||
/>
|
||||
</Badge>*/}
|
||||
</Badge>
|
||||
|
||||
<button
|
||||
className="xl:hidden text-brand-400 text-2xl"
|
||||
@@ -117,7 +116,14 @@ export default function Header() {
|
||||
<div className="flex items-center gap-3 pt-2 border-t border-subtle">
|
||||
<LanguageToggle/>
|
||||
<ThemeToggle/>
|
||||
<Button icon={<UserOutlined/>} className="flex-1">
|
||||
<Button
|
||||
icon={<UserOutlined/>}
|
||||
className="flex-1"
|
||||
href="https://panel.my-rm.com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
onClick={() => setMobileOpen(false)}
|
||||
>
|
||||
{t.nav.login}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user