Files
assetx/app/product/page.tsx
default b98500e61f feat: refactor Product page to match prototype design
Redesigned ProductCard and Product page based on original prototype:

ProductCard Component:
- Added gradient background matching prototype style
- Copied all SVG icons from prototype (US flags, HK flag, etc.)
- Implemented proper icon display with white background container
- Added category color variants (blue, green, purple)
- Risk level indicators with accurate colors
- Styled progress bar matching prototype
- Proper spacing and typography from CSS

Visual Elements:
- Radial gradient backgrounds on cards
- Glass-morphism effect with transparency
- Shadow and border effects from prototype
- Icon container with white background and shadow ring
- Category badges with colored backgrounds

Assets Added:
- frame-9230.svg, frame-9231.svg (US flag icons)
- hk0.svg (HK flag icon)
- chart-square1.svg
- All component SVG files from prototype
- View toggle icons

Styling:
- Followed prototype's style.css specifications
- Maintained exact color values and gradients
- Proper border radius and spacing
- Typography matching prototype

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-30 05:35:08 +00:00

164 lines
4.9 KiB
TypeScript

"use client";
import { useApp } from "@/contexts/AppContext";
import Sidebar from "@/components/Sidebar";
import TopBar from "@/components/TopBar";
import StatsCards from "@/components/StatsCards";
import ProductCard from "@/components/ProductCard";
import Image from "next/image";
import { Button } from "@heroui/react";
export default function ProductPage() {
const { t } = useApp();
const statsData = [
{
label: "Total Value Locked",
value: "$465.0M",
change: "+2.4%",
isPositive: true,
},
{
label: "Cumulative Yield",
value: "$505,232",
change: "+2.4%",
isPositive: true,
},
{
label: "Your Total Balance",
value: "$10,000",
change: "+2.4%",
isPositive: true,
},
{
label: "Your Total Earning",
value: "--",
change: "+2.4%",
isPositive: true,
},
];
const products = [
{
id: 1,
name: "High-Yield US Equity",
category: "Quant Strategy",
categoryColor: "blue" as const,
iconType: "us-flag-1" as const,
yieldAPY: "22.0%",
poolCap: "10M",
maturity: "05 Feb 2026",
risk: "Medium",
riskLevel: 2 as const,
lockUp: "12 Months",
circulatingSupply: "$2.5M",
poolCapacityPercent: 75,
},
{
id: 2,
name: "HK Commercial RE",
category: "Real Estate",
categoryColor: "green" as const,
iconType: "hk-flag" as const,
yieldAPY: "22.0%",
poolCap: "10M",
maturity: "05 Feb 2026",
risk: "LOW",
riskLevel: 1 as const,
lockUp: "12 Months",
circulatingSupply: "$2.5M",
poolCapacityPercent: 75,
},
{
id: 3,
name: "High-Yield US Equity",
category: "Quant Strategy",
categoryColor: "purple" as const,
iconType: "us-flag-2" as const,
yieldAPY: "22.0%",
poolCap: "10M",
maturity: "05 Feb 2026",
risk: "High",
riskLevel: 3 as const,
lockUp: "12 Months",
circulatingSupply: "$2.5M",
poolCapacityPercent: 75,
},
];
return (
<div className="min-h-screen bg-bg-subtle dark:bg-gray-900 flex">
<Sidebar />
<div className="flex-1 flex flex-col ml-[222px]">
<div className="bg-bg-surface dark:bg-gray-800 border-b border-border-normal dark:border-gray-700 px-8 py-6">
<TopBar />
</div>
<div className="flex-1 px-8 py-8">
{/* Page Title */}
<div className="mb-8">
<h1 className="text-heading-h2 font-bold text-text-primary dark:text-white">
AssetX Fund Market
</h1>
</div>
{/* Stats Cards */}
<div className="mb-8">
<StatsCards stats={statsData} />
</div>
{/* Assets Section */}
<div className="flex flex-col gap-6">
{/* Section Header */}
<div className="flex items-center justify-between">
<h2 className="text-heading-h3 font-bold text-text-primary dark:text-white">
Assets
</h2>
<div className="flex items-center gap-2">
<button className="p-2 rounded-lg hover:bg-bg-subtle dark:hover:bg-gray-700 transition-colors">
<Image
src="/edit-list-unordered0.svg"
alt="List view"
width={20}
height={20}
/>
</button>
<button className="p-2 rounded-lg hover:bg-bg-subtle dark:hover:bg-gray-700 transition-colors">
<Image
src="/menu-more-grid-small0.svg"
alt="Grid view"
width={20}
height={20}
/>
</button>
</div>
</div>
{/* Product Cards Grid */}
<div className="flex flex-col gap-6">
{products.map((product) => (
<ProductCard
key={product.id}
name={product.name}
category={product.category}
categoryColor={product.categoryColor}
iconType={product.iconType}
yieldAPY={product.yieldAPY}
poolCap={product.poolCap}
maturity={product.maturity}
risk={product.risk}
riskLevel={product.riskLevel}
lockUp={product.lockUp}
circulatingSupply={product.circulatingSupply}
poolCapacityPercent={product.poolCapacityPercent}
onInvest={() => console.log("Invest in", product.name)}
/>
))}
</div>
</div>
</div>
</div>
</div>
);
}