add staking page

This commit is contained in:
2026-06-17 18:24:14 +03:00
parent a5bb7abce8
commit e135fc1a9d
10 changed files with 191 additions and 135 deletions

View File

@@ -1,7 +1,7 @@
import { PrimaryButton, TokenIcon } from '@shared/ui'
import { PrimaryButton } from '@shared/ui'
import { truncateDecimals } from '@shared/lib/utils/truncateDecimals'
import type { Pool, LpQuote } from '@features/pools'
import { coinIcon, formatFeeTier } from '../model/meta'
import { formatFeeTier } from '../model/meta'
import styles from './LpDepositCard.module.css'
interface Props {
@@ -30,12 +30,10 @@ const decimalRe = /^(\d+\.?\d*|\.?\d*)$/
function AmountInput({
symbol,
value,
color,
onChange,
}: {
symbol: string
value: string
color: string
onChange: (v: string) => void
}) {
return (
@@ -53,7 +51,6 @@ function AmountInput({
aria-label={`Сумма ${symbol}`}
/>
<div className={styles.token}>
<TokenIcon letter={symbol[0]} color={color} logo={coinIcon(symbol)} size={28} />
<span>{symbol}</span>
</div>
</div>
@@ -110,12 +107,6 @@ export function LpDepositCard({
return (
<div className={styles.card}>
<div className={styles.placeholder}>
<span className={styles.placeholderIcon} aria-hidden>
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round">
<circle cx="9" cy="9" r="5" />
<circle cx="15" cy="15" r="5" />
</svg>
</span>
<p className={styles.placeholderTitle}>Выберите пул</p>
<p className={styles.placeholderText}>
Выберите пул в таблице выше, чтобы внести ликвидность.
@@ -139,10 +130,6 @@ export function LpDepositCard({
<div className={styles.card}>
<div className={styles.top}>
<span className={styles.pair}>
<span className={styles.icons}>
<TokenIcon letter={pool.symbol0[0]} color="var(--grad-center)" logo={coinIcon(pool.symbol0)} size={24} />
<TokenIcon letter={pool.symbol1[0]} color="var(--grad-edge)" logo={coinIcon(pool.symbol1)} size={24} />
</span>
{pool.symbol0}/{pool.symbol1}
</span>
<span className={styles.fee}>{formatFeeTier(pool.feeTier)}</span>
@@ -150,8 +137,8 @@ export function LpDepositCard({
<span className={styles.tag}>Суммы взноса</span>
<div className={styles.amounts}>
<AmountInput symbol={pool.symbol0} value={amount0} color="var(--grad-center)" onChange={onAmount0Change} />
<AmountInput symbol={pool.symbol1} value={amount1} color="var(--grad-edge)" onChange={onAmount1Change} />
<AmountInput symbol={pool.symbol0} value={amount0} onChange={onAmount0Change} />
<AmountInput symbol={pool.symbol1} value={amount1} onChange={onAmount1Change} />
</div>
<span className={styles.tag}>Диапазон цен ({pool.symbol1} за {pool.symbol0})</span>