mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-30 06:20:24 +00:00
add admin checks for admin pages and run biome formating 🔨
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m8s
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m8s
This commit is contained in:
@ -21,11 +21,7 @@ import { WalletDrawerOpenAtom, walletTopUpValue } from "@/lib/atoms";
|
||||
import type { TopupType } from "@/lib/types";
|
||||
import NumberInput from "./number-input";
|
||||
|
||||
export function Wallet({
|
||||
walletBalance,
|
||||
}: {
|
||||
walletBalance: number;
|
||||
}) {
|
||||
export function Wallet({ walletBalance }: { walletBalance: number }) {
|
||||
const pathname = usePathname();
|
||||
const [amount, setAmount] = useAtom(walletTopUpValue);
|
||||
const [isOpen, setIsOpen] = useAtom(WalletDrawerOpenAtom);
|
||||
@ -83,13 +79,13 @@ export function Wallet({
|
||||
onClick={async () => {
|
||||
console.log(data);
|
||||
setDisabled(true);
|
||||
const topup = await createTopup(data)
|
||||
const topup = await createTopup(data);
|
||||
setDisabled(false);
|
||||
if (topup) {
|
||||
router.push(`/top-ups/${topup.id}`);
|
||||
setIsOpen(!isOpen);
|
||||
} else {
|
||||
toast.error("Something went wrong.")
|
||||
toast.error("Something went wrong.");
|
||||
}
|
||||
}}
|
||||
className="w-full"
|
||||
|
Reference in New Issue
Block a user