balls
This commit is contained in:
18
app/dashboard/withdrawal/page.tsx
Normal file
18
app/dashboard/withdrawal/page.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import WithdrawalsPageClient from "./WithdrawalsPageClient";
|
||||
|
||||
export default async function WithdrawalsPage() {
|
||||
const authToken = ""; // Fetch token from cookies if needed
|
||||
const [balancesRes, withdrawalsRes] = await Promise.all([
|
||||
fetch(`${process.env.NEXT_PUBLIC_API_URL}/balances`, {
|
||||
headers: { Authorization: `Bearer ${authToken}` },
|
||||
}),
|
||||
fetch(`${process.env.NEXT_PUBLIC_API_URL}/withdrawals`, {
|
||||
headers: { Authorization: `Bearer ${authToken}` },
|
||||
}),
|
||||
]);
|
||||
|
||||
const balances = balancesRes.ok ? await balancesRes.json() : {};
|
||||
const withdrawals = withdrawalsRes.ok ? await withdrawalsRes.json() : [];
|
||||
|
||||
return <WithdrawalsPageClient balances={balances} withdrawals={withdrawals} />;
|
||||
}
|
||||
Reference in New Issue
Block a user