mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-12-04 04:03:21 +00:00
fix: set 100 MVR for default wallet topup amount 🔧
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import { cn } from "@/lib/utils";
|
|
||||||
import { Minus, Plus } from "lucide-react";
|
import { Minus, Plus } from "lucide-react";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import {
|
import {
|
||||||
@@ -8,18 +7,19 @@ import {
|
|||||||
Label,
|
Label,
|
||||||
NumberField,
|
NumberField,
|
||||||
} from "react-aria-components";
|
} from "react-aria-components";
|
||||||
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
export default function NumberInput({
|
export default function NumberInput({
|
||||||
maxAllowed,
|
maxAllowed,
|
||||||
label,
|
label,
|
||||||
value,
|
value = 100,
|
||||||
onChange,
|
onChange,
|
||||||
className,
|
className,
|
||||||
isDisabled,
|
isDisabled,
|
||||||
}: {
|
}: {
|
||||||
maxAllowed?: number;
|
maxAllowed?: number;
|
||||||
label: string;
|
label: string;
|
||||||
value: number;
|
value?: number;
|
||||||
onChange: (value: number) => void;
|
onChange: (value: number) => void;
|
||||||
className?: string;
|
className?: string;
|
||||||
isDisabled?: boolean;
|
isDisabled?: boolean;
|
||||||
@@ -31,6 +31,7 @@ export default function NumberInput({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [maxAllowed, value, onChange]);
|
}, [maxAllowed, value, onChange]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NumberField
|
<NumberField
|
||||||
isDisabled={isDisabled}
|
isDisabled={isDisabled}
|
||||||
|
|||||||
@@ -39,8 +39,7 @@ export function Wallet({ walletBalance }: { walletBalance: number }) {
|
|||||||
<Drawer open={isOpen} onOpenChange={setIsOpen}>
|
<Drawer open={isOpen} onOpenChange={setIsOpen}>
|
||||||
<DrawerTrigger asChild>
|
<DrawerTrigger asChild>
|
||||||
<Button onClick={() => setIsOpen(!isOpen)} variant="outline">
|
<Button onClick={() => setIsOpen(!isOpen)} variant="outline">
|
||||||
{walletBalance}{" "}
|
{walletBalance} MVR
|
||||||
MVR
|
|
||||||
<Wallet2 />
|
<Wallet2 />
|
||||||
</Button>
|
</Button>
|
||||||
</DrawerTrigger>
|
</DrawerTrigger>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export const discountPercentageAtom = atom(75);
|
|||||||
export const numberOfDevicesAtom = atom(1);
|
export const numberOfDevicesAtom = atom(1);
|
||||||
export const numberOfDaysAtom = atom(30);
|
export const numberOfDaysAtom = atom(30);
|
||||||
export const numberOfMonths = atom(1);
|
export const numberOfMonths = atom(1);
|
||||||
export const walletTopUpValue = atom(1);
|
export const walletTopUpValue = atom(100);
|
||||||
export const formulaResultAtom = atom("");
|
export const formulaResultAtom = atom("");
|
||||||
export const deviceCartAtom = atom<Device[]>([]);
|
export const deviceCartAtom = atom<Device[]>([]);
|
||||||
export const cartDrawerOpenAtom = atom(false);
|
export const cartDrawerOpenAtom = atom(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user