fix: set 100 MVR for default wallet topup amount 🔧

This commit is contained in:
2025-09-20 14:25:48 +05:00
parent f2a17d522b
commit 19043aa692
3 changed files with 151 additions and 151 deletions

View File

@@ -1,4 +1,3 @@
import { cn } from "@/lib/utils";
import { Minus, Plus } from "lucide-react";
import { useEffect } from "react";
import {
@@ -8,18 +7,19 @@ import {
Label,
NumberField,
} from "react-aria-components";
import { cn } from "@/lib/utils";
export default function NumberInput({
maxAllowed,
label,
value,
value = 100,
onChange,
className,
isDisabled,
}: {
maxAllowed?: number;
label: string;
value: number;
value?: number;
onChange: (value: number) => void;
className?: string;
isDisabled?: boolean;
@@ -31,6 +31,7 @@ export default function NumberInput({
}
}
}, [maxAllowed, value, onChange]);
return (
<NumberField
isDisabled={isDisabled}

View File

@@ -39,8 +39,7 @@ export function Wallet({ walletBalance }: { walletBalance: number }) {
<Drawer open={isOpen} onOpenChange={setIsOpen}>
<DrawerTrigger asChild>
<Button onClick={() => setIsOpen(!isOpen)} variant="outline">
{walletBalance}{" "}
MVR
{walletBalance} MVR
<Wallet2 />
</Button>
</DrawerTrigger>

View File

@@ -10,7 +10,7 @@ export const discountPercentageAtom = atom(75);
export const numberOfDevicesAtom = atom(1);
export const numberOfDaysAtom = atom(30);
export const numberOfMonths = atom(1);
export const walletTopUpValue = atom(1);
export const walletTopUpValue = atom(100);
export const formulaResultAtom = atom("");
export const deviceCartAtom = atom<Device[]>([]);
export const cartDrawerOpenAtom = atom(false);