mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-01 15:23:58 +00:00
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
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 1m47s
This commit is contained in:
@ -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+(n−1)×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);
|
||||
|
||||
|
Reference in New Issue
Block a user