-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
ODHack 14ODODUI/WebIssue targets the UI and the frontendIssue targets the UI and the frontendgood first issueGood for newcomersGood for newcomers
Description
Description
Personalized dashboard showing contest history and performance stats.
Acceptance Criteria:
- SSG page with client-side hydration
- Interactive charts:
- ROI over time (Line chart)
- Sport distribution (Pie chart)
- Win/loss ratio (Donut chart)
- Paginated transaction history table
- Downloadable tax report (PDF)
Technical Details:
// pages/dashboard/[wallet].tsx
export const getStaticPaths: GetStaticPaths = async () => {
return { paths: [], fallback: 'blocking' };
};
export const getStaticProps: GetStaticProps = async ({ params }) => {
const res = await fetchUserData(params.wallet as string);
return { props: { userData: await res.json() } };
};
export default function Dashboard({ userData }: { userData: User }) {
const { data } = useSWR(`/api/users/${userData.wallet}`, {
fallbackData: userData
});
return (
<div>
<PortfolioChart data={data.performance} />
<TransactionHistory transactions={data.txns} />
</div>
);
}Notes:
- Use
rechartsfor visualizations - Implement SSG with fallback
- Add CSV/PDF export functionality
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ODHack 14ODODUI/WebIssue targets the UI and the frontendIssue targets the UI and the frontendgood first issueGood for newcomersGood for newcomers