feat: add getProfile function and integrate user profile retrieval in payment and layout components
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 1m47s

This commit is contained in:
2025-04-20 07:40:31 +05:00
parent ac11fee754
commit ba91d2c8d4
5 changed files with 51 additions and 18 deletions

View File

@ -9,6 +9,7 @@ import {
TableRow,
} from "@/components/ui/table";
import type { Payment } from "@/lib/backend-types";
import type { User } from "@/lib/types/user";
import {
BadgeDollarSign,
Clipboard,
@ -16,7 +17,6 @@ import {
Loader2,
Wallet,
} from "lucide-react";
import type { User } from "next-auth";
import { useState } from "react";
import { toast } from "sonner";
import { Button } from "./ui/button";
@ -33,9 +33,7 @@ export default function DevicesToPay({
return null;
}
// 100+(n1)×75
// const walletBalance = user?.walletBalance ?? 0;
// TODO - get wallet balance from backend
const walletBalance = 110;
const walletBalance = user?.wallet_balance ?? 0;
const isWalletPayVisible = walletBalance > (payment?.amount ?? 0);