Download frontend/src/components/UserProfile.jsx from bhuvi3/CIOAgent: direct link, hf CLI and curl.
- Browser
- Download file 1.45 kB
-
https://huggingface.co/spaces/bhuvi3/CIOAgent/resolve/main/frontend/src/components/UserProfile.jsx
- Command line
-
hf download hf://spaces/bhuvi3/CIOAgent/frontend/src/components/UserProfile.jsx
-
curl -L -o UserProfile.jsx https://huggingface.co/spaces/bhuvi3/CIOAgent/resolve/main/frontend/src/components/UserProfile.jsx
1.45 kB
| import React from "react"; | |
| export default function UserProfile({ profile, netWorth, debtRatio }) { | |
| let debtClass = "success"; | |
| let debtMsg = "Conservative leverage."; | |
| if (debtRatio > 0.5) { | |
| debtClass = "warning"; | |
| debtMsg = "High leverage may limit risk capacity."; | |
| } else if (debtRatio > 0.3) { | |
| debtClass = "info"; | |
| debtMsg = "Moderate leverage."; | |
| } | |
| return ( | |
| <section className="section"> | |
| <h2>Investor Profile</h2> | |
| <div className="metrics-row"> | |
| <div className="metric-card"> | |
| <span className="metric-label">Total Assets</span> | |
| <span className="metric-value">${profile.total_assets.toLocaleString()}</span> | |
| </div> | |
| <div className="metric-card"> | |
| <span className="metric-label">Total Liabilities</span> | |
| <span className="metric-value">${profile.total_liabilities.toLocaleString()}</span> | |
| </div> | |
| <div className="metric-card"> | |
| <span className="metric-label">Net Worth</span> | |
| <span className="metric-value">${netWorth.toLocaleString()}</span> | |
| </div> | |
| <div className="metric-card"> | |
| <span className="metric-label">Risk Tolerance</span> | |
| <span className="metric-value">{profile.risk_tolerance}</span> | |
| </div> | |
| </div> | |
| <div className={`alert ${debtClass}`}> | |
| Debt-to-asset ratio: {(debtRatio * 100).toFixed(1)}% — {debtMsg} | |
| </div> | |
| </section> | |
| ); | |
| } | |