import { ConnectButton } from '@rainbow-me/rainbowkit' import { useTranslation } from 'react-i18next' import { usePools } from '../hooks/usePools' import { HistoryButton } from './HistoryButton' import { LangControl } from './LangControl' import { NewsButton } from './NewsButton' export type TabId = 'pools' | 'positions' | 'swap' | 'bridge' const TABS = [ { id: 'pools', labelKey: 'hdr.pools', key: '1' }, { id: 'positions', labelKey: 'hdr.positions', key: '2' }, { id: 'swap', labelKey: 'hdr.swap', key: '3' }, { id: 'bridge', labelKey: 'hdr.bridge', key: '5' }, ] as const export function Header(props: { tab: TabId; onTab: (t: TabId) => void }) { const { t } = useTranslation() const pools = usePools() const p = pools.data?.protocol return (
{/* the wordmark contracts to "LP▮" on a phone — at full length the utility cluster no longer fits one row, and CONNECT wraps to a second */} LP TERMINAL
{TABS.map((tb) => ( ))}
{p && ( {t('hdr.blk')} {p.blockNumber.toString()} )} {({ account, chain, openAccountModal, openChainModal, openConnectModal, mounted }) => { if (!mounted) return if (!account) return ( ) if (chain?.unsupported) return ( ) return ( ) }}
) }