import React from 'react'; import { GlassCard } from '@/components/ui/GlassCard'; import { formatAmount } from '@/lib/utils'; import { DirhamIcon } from '@/components/ui/custom-icons'; interface AssetAllocationProps { holdings: Array<{ name: string; symbol: string; currentValue: number; sector: string; // Keep for color logic if needed shares?: number; units?: number; }>; totalValue: number; } const AssetAllocation: React.FC = ({ holdings, totalValue }) => { // Sort holdings by value descending const sortedHoldings = [...holdings].sort((a, b) => b.currentValue - a.currentValue); // Helper to get color based on index const getGradient = (index: number) => { const gradients = [ 'from-blue-500 to-blue-600', 'from-green-500 to-green-600', 'from-purple-500 to-purple-600', 'from-orange-500 to-orange-600', 'from-pink-500 to-pink-600', 'from-teal-500 to-teal-600', ]; return gradients[index % gradients.length]; }; return (

Asset Allocation

{sortedHoldings.map((stock, index) => { const percentage = ((stock.currentValue / totalValue) * 100).toFixed(1); return (
{stock.symbol} {stock.name}
{percentage}%
); })}
); }; export default AssetAllocation;