diff --git a/apps/nextjs/src/app/(app)/account/lords/velords/VeLordsRewardsChart.tsx b/apps/nextjs/src/app/(app)/account/lords/velords/VeLordsRewardsChart.tsx
index 5acbb94c..11fefae7 100644
--- a/apps/nextjs/src/app/(app)/account/lords/velords/VeLordsRewardsChart.tsx
+++ b/apps/nextjs/src/app/(app)/account/lords/velords/VeLordsRewardsChart.tsx
@@ -1,42 +1,93 @@
-"use client"
+"use client";
-import { Line, LineChart, CartesianGrid, YAxis, XAxis } from "recharts"
+import { Line, LineChart, CartesianGrid, YAxis, XAxis } from "recharts";
import LordsIcon from "@/icons/lords.svg";
-import type { ChartConfig } from "@realms-world/ui/components/ui/chart"
-import { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent } from "@realms-world/ui/components/ui/chart"
+import type { ChartConfig } from "@realms-world/ui/components/ui/chart";
+import {
+ ChartContainer,
+ ChartTooltip,
+ ChartTooltipContent,
+ ChartLegend,
+ ChartLegendContent,
+} from "@realms-world/ui/components/ui/chart";
const chartConfig = {
- total_amount: {
- label: "Lords",
- color: "hsl(36 88.9% 85.9%)",
- icon: LordsIcon
- },
- apy: {
- label: "APY %",
- color: "hsl(338.33 100% 78.82%)",
- },
-} satisfies ChartConfig
+ total_amount: {
+ label: "Lords",
+ color: "hsl(36 88.9% 85.9%)",
+ icon: LordsIcon,
+ },
+ apy: {
+ label: "APY %",
+ color: "hsl(338.33 100% 78.82%)",
+ },
+} satisfies ChartConfig;
-export function VeLordsRewardsChart({ data, totalSupply }: { data?: { total_amount: string; week: string }[], totalSupply?: number }) {
- const parsedData = totalSupply ? data?.map(item => ({
- week: new Date(item.week).toISOString().split('T')[0], // Convert to YYYY-MM-DD
- total_amount: parseFloat(item.total_amount).toFixed(3),
- apy: parseInt(item.total_amount) * 52 / (totalSupply * 208) * 100
- })) : [];
+export function VeLordsRewardsChart({
+ data,
+ totalSupply,
+}: {
+ data?: { total_amount: string; week: string }[];
+ totalSupply?: number;
+}) {
+ const parsedData = totalSupply
+ ? data?.map((item) => ({
+ week: new Date(item.week).toISOString().split("T")[0], // Convert to YYYY-MM-DD
+ total_amount: parseFloat(item.total_amount),
+ apy: ((parseInt(item.total_amount) * 52) / totalSupply) * 100,
+ }))
+ : [];
- return (
-
-
-
-
-
-
- } />
- } />
-
-
-
-
- )
-}
\ No newline at end of file
+ return (
+
+
+
+
+
+
+ } />
+ } />
+
+
+
+
+ );
+}