Skip to content

Commit

Permalink
feat: add risk comment and fix css mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Sep 25, 2024
1 parent acbd713 commit ac47404
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions apps/vaults-v3/components/details/tabs/VaultRiskInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ export function VaultRiskInfo({currentVault}: {currentVault: TYDaemonVault}): Re
</div>
</div>

<div
className={cl(
'grid w-full grid-cols-12 items-center mb-6',
currentVault.info.riskScoreComment ? '' : 'hidden'
)}>
<div className={'col-span-10'}>
<p>{'Comment'}</p>
<small className={'whitespace-break-spaces text-xs text-neutral-900/40'}>
{currentVault.info.riskScoreComment}
</small>
</div>
</div>

<div className={cl('grid w-full grid-cols-12 items-center gap-6', hasRiskScore ? '' : 'hidden')}>
<div className={'col-span-10'}>
<p>{'Review'}</p>
Expand Down
2 changes: 1 addition & 1 deletion apps/vaults-v3/components/list/VaultsV3ListRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ function VaultRiskScoreTag({riskLevel}: {riskLevel: number}): ReactElement {
const level = riskLevel < 0 ? 0 : riskLevel > 5 ? 5 : riskLevel;
const riskColor = [`transparent`, `#63C532`, `#F8A908`, `#F8A908`, `#C73203`, `#C73203`];
return (
<div className={'col-span-2 flex flex-row justify-center md:col-span-2 md:flex-col'}>
<div className={'col-span-2 flex flex-row justify-between md:col-span-2 md:flex-col md:justify-center'}>
<p className={'inline whitespace-nowrap text-start text-xs text-neutral-800/60 md:hidden'}>
{'Risk Score'}
</p>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@tailwindcss/typography": "^0.5.13",
"@tanstack/react-query": "^5.51.11",
"@wagmi/core": "^2.11.7",
"@yearn-finance/web-lib": "^4.1.1",
"@yearn-finance/web-lib": "^4.1.3",
"axios": "^1.7.2",
"ethers": "5.7.2",
"framer-motion": "^11.2.10",
Expand Down

0 comments on commit ac47404

Please sign in to comment.