diff --git a/src/shared/config/constants.ts b/src/shared/config/constants.ts index e7992d1..f349f79 100644 --- a/src/shared/config/constants.ts +++ b/src/shared/config/constants.ts @@ -1,4 +1,3 @@ -export const COUNTDOWN_TARGET = new Date('2026-05-21T00:00:00').getTime() export const USDT_RATE = 80.00 export const GAS_PRICE = 21.00 export const MIN_RUB_AMOUNT = 5000 diff --git a/src/widgets/footer/ui/Footer.tsx b/src/widgets/footer/ui/Footer.tsx index dad2861..9204282 100644 --- a/src/widgets/footer/ui/Footer.tsx +++ b/src/widgets/footer/ui/Footer.tsx @@ -6,7 +6,7 @@ import { ROUTES } from '@shared/config/routes' import styles from './Footer.module.css' const SOCIALS = [ - { href: '#', icon: telegram, label: 'Telegram' }, + { href: 'https://t.me/+UU4vqX4ENMJhMjBi', icon: telegram, label: 'Telegram' }, { href: '#', icon: whatsapp, label: 'WhatsApp' }, { href: '#', icon: instagram, label: 'Instagram' }, ] diff --git a/src/widgets/hero/lib/useCountdown.ts b/src/widgets/hero/lib/useCountdown.ts deleted file mode 100644 index 3320a4c..0000000 --- a/src/widgets/hero/lib/useCountdown.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { useEffect, useState } from 'react' - -export interface CountdownValue { - d: string - h: string - m: string - s: string -} - -export function useCountdown(target: number): CountdownValue { - const [now, setNow] = useState(Date.now()) - - useEffect(() => { - const id = setInterval(() => setNow(Date.now()), 1000) - return () => clearInterval(id) - }, []) - - const diff = Math.max(0, target - now) - const pad = (n: number) => String(n).padStart(2, '0') - - return { - d: pad(Math.floor(diff / 86_400_000)), - h: pad(Math.floor((diff % 86_400_000) / 3_600_000)), - m: pad(Math.floor((diff % 3_600_000) / 60_000)), - s: pad(Math.floor((diff % 60_000) / 1000)), - } -} diff --git a/src/widgets/hero/ui/Countdown.tsx b/src/widgets/hero/ui/Countdown.tsx deleted file mode 100644 index c470bc8..0000000 --- a/src/widgets/hero/ui/Countdown.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { useCountdown } from '../lib/useCountdown' -import styles from './Countdown.module.css' - -const UNITS: Array<['d' | 'h' | 'm' | 's', string]> = [ - ['d', 'ДНЕЙ'], - ['h', 'ЧАСОВ'], - ['m', 'МИНУТ'], - ['s', 'СЕКУНД'], -] - -interface Props { - target: number -} - -export function Countdown({ target }: Props) { - const cd = useCountdown(target) - - return ( -
-
ДО ЗАПУСКА ОСТАЛОСЬ
-
- {UNITS.map(([key, label]) => ( -
-
{cd[key]}
-
{label}
-
- ))} -
-
- ) -} diff --git a/src/widgets/hero/ui/Hero.tsx b/src/widgets/hero/ui/Hero.tsx index 5da5045..45f9056 100644 --- a/src/widgets/hero/ui/Hero.tsx +++ b/src/widgets/hero/ui/Hero.tsx @@ -1,6 +1,4 @@ -import { COUNTDOWN_TARGET } from '@shared/config/constants' import { ConversionFlow } from './ConversionFlow' -import { Countdown } from './Countdown' import { ExchangeCard } from './ExchangeCard' import styles from './Hero.module.css' @@ -31,7 +29,6 @@ export function Hero() {
- Попробовать калькулятор