feat: похуйу
This commit is contained in:
@@ -14,10 +14,10 @@ export function ConverterSection() {
|
|||||||
|
|
||||||
const c = useConverter({ usdtRate })
|
const c = useConverter({ usdtRate })
|
||||||
|
|
||||||
const debouncedRub = useDebounce(c.numRub, 400)
|
const debouncedUsdt = useDebounce(c.numRub, 400)
|
||||||
const { data: quote } = usePaymentQuote(debouncedRub)
|
const { data: quote } = usePaymentQuote(debouncedUsdt)
|
||||||
|
|
||||||
const usdtVal = quote ? quote.usdt_amount : c.usdtVal
|
const rubTotal = quote?.total_price ?? ''
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.wrap}>
|
<div className={styles.wrap}>
|
||||||
@@ -58,9 +58,15 @@ export function ConverterSection() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.field}>
|
<div className={styles.field}>
|
||||||
<div className={styles.fieldLabel}>Получаете</div>
|
<div className={styles.fieldLabel}>Конвертируете</div>
|
||||||
<div className={styles.fieldInput}>
|
<div className={styles.fieldInput}>
|
||||||
<input type="text" value={usdtVal} readOnly />
|
<input
|
||||||
|
type="text"
|
||||||
|
value={c.rubVal}
|
||||||
|
onChange={(e) => c.updateRub(e.target.value)}
|
||||||
|
placeholder="0"
|
||||||
|
inputMode="decimal"
|
||||||
|
/>
|
||||||
<div className={styles.currency}>
|
<div className={styles.currency}>
|
||||||
<span className={`${styles.currencyIcon} ${styles.currencyUsdt}`}>₮</span>
|
<span className={`${styles.currencyIcon} ${styles.currencyUsdt}`}>₮</span>
|
||||||
USDT
|
USDT
|
||||||
@@ -72,6 +78,8 @@ export function ConverterSection() {
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className={styles.swapBtn}
|
className={styles.swapBtn}
|
||||||
|
onClick={c.toggleMode}
|
||||||
|
aria-label="Поменять направление"
|
||||||
>
|
>
|
||||||
<svg width={16} height={16} viewBox="0 0 16 16" fill="none">
|
<svg width={16} height={16} viewBox="0 0 16 16" fill="none">
|
||||||
<path
|
<path
|
||||||
@@ -88,13 +96,7 @@ export function ConverterSection() {
|
|||||||
<div className={styles.field}>
|
<div className={styles.field}>
|
||||||
<div className={styles.fieldLabel}>Платите</div>
|
<div className={styles.fieldLabel}>Платите</div>
|
||||||
<div className={styles.fieldInput}>
|
<div className={styles.fieldInput}>
|
||||||
<input
|
<input type="text" value={rubTotal} readOnly placeholder="0" />
|
||||||
type="text"
|
|
||||||
value={c.rubVal}
|
|
||||||
onChange={(e) => c.updateRub(e.target.value)}
|
|
||||||
placeholder="0"
|
|
||||||
inputMode="decimal"
|
|
||||||
/>
|
|
||||||
<div className={styles.currency}>
|
<div className={styles.currency}>
|
||||||
<span className={`${styles.currencyIcon} ${styles.currencyRub}`}>₽</span>
|
<span className={`${styles.currencyIcon} ${styles.currencyRub}`}>₽</span>
|
||||||
RUB
|
RUB
|
||||||
|
|||||||
Reference in New Issue
Block a user