add admin checks for admin pages and run biome formating 🔨

This commit is contained in:
2025-07-25 13:31:12 +05:00
parent aedf7cdf7d
commit 9b2f2c1528
127 changed files with 6572 additions and 6329 deletions
+3 -7
View File
@@ -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"