// import PulseDot from '@/components/icons/PulseDot' import { useTranslations } from 'next-intl' import { CHAINS_ARR } from '@/constants/chains' import * as BRIDGEABLE from '@constants/tokens/bridgeable' import { TOKENS_SORTED_BY_SWAPABLETYPE } from '@/constants/tokens' // import * as WALLET_ICONS from '@components/WalletIcons' const cardStyle = 'text-black dark:text-white bg-zinc-100 dark:bg-bgBase p-3 rounded-[.75rem] border border-zinc-200 dark:border-zinc-800 shadow-xl grid gap-4 max-w-sm' // dark:bg-zinc-900/95 const sectionStyle = 'relative bg-zinc-50 dark:bg-bgLight rounded-md px-2.5 py-3 grid gap-1 grid-cols-2 border border-zinc-300 dark:border-transparent' // dark:bg-zinc-800 const buttonStyle = 'rounded px-4 py-1 bg-zinc-100 dark:bg-separator border border-zinc-200 dark:border-transparent hover:border-zinc-400 hover:dark:border-zinc-500 h-fit mr-1 cursor-pointer focus:border-zinc-400 focus:dark:borer-zinc-500' // dark:bg-zinc-700 const chainSelectStyle = 'flex gap-2 items-center rounded px-2 py-1 bg-inherit border border-zinc-200 dark:border-transparent hover:border-zinc-400 hover:dark:border-zinc-500 active:opacity-70 focus:ring-1 focus:ring-zinc-500 focus:border-transparent' const tokenSelectStyle = 'flex gap-2 items-center rounded px-2 py-1.5 bg-inherit dark:bg-separator border border-zinc-200 dark:border-transparent hover:border-zinc-400 hover:dark:border-zinc-500 active:opacity-70 focus:ring-1 focus:ring-zinc-500 focus:border-transparent text-lg ' // dark:bg-zinc-700 const inputWrapperStyle = 'relative flex bg-white dark:bg-inherit border border-zinc-200 dark:border-separator rounded-md gap-0 p-1.5 col-span-2 gap-1.5 items-center' // dark:border-zinc-700 const inputStyle = 'bg-inherit border-none w-full p-1.5 text-xxl font-normal dark:font-medium tracking-wide rounded placeholder:text-secondary pointer-events-none' export default () => { return (
) } const Select = ({ type, defaultName, label, data, }: { type: 'Chain' | 'Token' defaultName?: string label?: string data: 'volume' | 'count' }) => { let button: string let header: string let value: number let reduce: Function let format: Function switch (data) { case 'volume': button = `Volume by ${type}` header = '$ vol.' value = 1000000000 + Math.random() * 100000000 reduce = () => (value *= 0.85) format = () => { if (value >= 1000000) return '$' + (value / 1000000).toFixed(1) + 'M' let str = value.toFixed(0) if (value >= 1000) { for (let i = 3; i < str.length; i += 4) str = `${str.slice(0, str.length - i)},${str.slice(-i)}` return '$' + str } return '$' + value.toFixed(2) } break case 'count': button = `Txns by ${type}` header = 'Txns' value = 10000 + Math.random() * 1000 reduce = () => (value *= 0.9) format = () => { let str = value.toFixed() for (let i = 3; i < str.length; i += 4) str = `${str.slice(0, str.length - i)},${str.slice(-i)}` return str } break } let arr let key: string let img: string let name: string switch (type) { case 'Chain': arr = CHAINS_ARR key = 'id' img = 'chainImg' name = 'name' break case 'Token': arr = Object.values(BRIDGEABLE) key = 'name' img = 'icon' name = 'symbol' break } const defaultItem = arr.find((a) => a[name] === defaultName) const t = useTranslations('FauxBridge') return (
{/* */} {arr.map((item, i) => { reduce() return ( {/* */} ) })}
{type} {header}
{item[name]} {format()}
) } const SupportedWallets = () => { const t = useTranslations('FauxBridge') return (
{t('Supported wallets')}
    {/* {Object.values(WALLET_ICONS).map((icon, i) => (
  • {icon({ width: 24, height: 24 })}
  • ))} */}
) } const HistoricMax = () => { const t = useTranslations('FauxBridge') return (
  • {t('40,668 ETH')}
  • {t('Fantom')}
  • {t('40,668 ETH')}
  • {t('Ethereum')}
{t('Jan 29, 2022 - #1')}
) } const RightAngle = ({ height }) => { const width = height / 2 return ( ) } const BridgeButton = () => { const t = useTranslations('FauxBridge') return (
{t('Enter Bridge')}
{ const target = e.target as HTMLAnchorElement target.querySelector('animate')?.beginElement() }} > {t('Bridge')}
) }