91 lines
3.2 KiB
TypeScript
91 lines
3.2 KiB
TypeScript
'use client';
|
|
|
|
import React from 'react';
|
|
import { Card } from '@/ui/Card';
|
|
import { Box } from '@/ui/Box';
|
|
import { Stack } from '@/ui/Stack';
|
|
import { Text } from '@/ui/Text';
|
|
import { Heading } from '@/ui/Heading';
|
|
import { Icon } from '@/ui/Icon';
|
|
import { Surface } from '@/ui/Surface';
|
|
import { Wallet, Calendar } from 'lucide-react';
|
|
import type { LeagueWalletViewData } from '@/lib/view-data/leagues/LeagueWalletViewData';
|
|
import { TransactionRow } from '@/components/leagues/TransactionRow';
|
|
|
|
interface LeagueWalletTemplateProps {
|
|
viewData: LeagueWalletViewData;
|
|
}
|
|
|
|
export function LeagueWalletTemplate({ viewData }: LeagueWalletTemplateProps) {
|
|
return (
|
|
<Stack gap={6}>
|
|
<Box>
|
|
<Heading level={2}>League Wallet</Heading>
|
|
<Text size="sm" color="text-gray-400" block mt={1}>
|
|
Financial overview and transaction history
|
|
</Text>
|
|
</Box>
|
|
|
|
<Stack gap={6}>
|
|
{/* Balance Card */}
|
|
<Card>
|
|
<Stack direction="row" align="center" gap={4}>
|
|
<Surface variant="muted" rounded="xl" padding={3} style={{ backgroundColor: 'rgba(59, 130, 246, 0.1)' }}>
|
|
<Icon icon={Wallet} size={6} color="#3b82f6" />
|
|
</Surface>
|
|
<Box>
|
|
<Text size="sm" color="text-gray-400" block>Current Balance</Text>
|
|
<Text size="3xl" weight="bold" color="text-white">
|
|
{viewData.formattedBalance}
|
|
</Text>
|
|
</Box>
|
|
</Stack>
|
|
</Card>
|
|
|
|
{/* Transaction History */}
|
|
<Card>
|
|
<Stack gap={4}>
|
|
<Stack direction="row" align="center" gap={3}>
|
|
<Surface variant="muted" rounded="lg" padding={2} style={{ backgroundColor: 'rgba(16, 185, 129, 0.1)' }}>
|
|
<Icon icon={Calendar} size={5} color="#10b981" />
|
|
</Surface>
|
|
<Box>
|
|
<Heading level={3}>Transaction History</Heading>
|
|
<Text size="sm" color="text-gray-400">Recent financial activity</Text>
|
|
</Box>
|
|
</Stack>
|
|
|
|
{viewData.transactions.length === 0 ? (
|
|
<Stack align="center" py={8} gap={4}>
|
|
<Icon icon={Wallet} size={12} color="#525252" />
|
|
<Text color="text-gray-400">No transactions yet</Text>
|
|
</Stack>
|
|
) : (
|
|
<Stack gap={3}>
|
|
{viewData.transactions.map((transaction) => (
|
|
<TransactionRow key={transaction.id} transaction={transaction} />
|
|
))}
|
|
</Stack>
|
|
)}
|
|
</Stack>
|
|
</Card>
|
|
|
|
{/* Note about features */}
|
|
<Card>
|
|
<Stack align="center" py={8} gap={4}>
|
|
<Surface variant="muted" rounded="full" padding={4} style={{ backgroundColor: 'rgba(59, 130, 246, 0.1)' }}>
|
|
<Icon icon={Wallet} size={8} color="#3b82f6" />
|
|
</Surface>
|
|
<Box style={{ textAlign: 'center' }}>
|
|
<Heading level={3}>Wallet Management</Heading>
|
|
<Text size="sm" color="text-gray-400" block mt={2}>
|
|
Interactive withdrawal and export features will be implemented in future updates.
|
|
</Text>
|
|
</Box>
|
|
</Stack>
|
|
</Card>
|
|
</Stack>
|
|
</Stack>
|
|
);
|
|
}
|