import { ErrorBoundary } from '@sentry/react'; import { CompetitionsHeader } from '../../components/competitions/competitions-header'; import { useRef, useState } from 'react'; import { useT } from '../../lib/use-t'; import { useTeams } from '../../lib/hooks/use-teams'; import { CompetitionsLeaderboard } from '../../components/competitions/competitions-leaderboard'; import { Input, Loader, VegaIcon, VegaIconNames, } from '@vegaprotocol/ui-toolkit'; import { usePageTitle } from '../../lib/hooks/use-page-title'; export const CompetitionsTeams = () => { const t = useT(); usePageTitle([t('Competitions'), t('Teams')]); const { data: teamsData, loading: teamsLoading } = useTeams(); const inputRef = useRef(null); const [filter, setFilter] = useState(undefined); return (

{t('Choose a team to get involved')}

{ const value = inputRef.current?.value; if (value != filter) setFilter(value); }} />
{teamsLoading ? ( ) : ( { if (filter && filter.length > 0) { const re = new RegExp(filter, 'i'); return re.test(td.name); } return true; })} /> )}
); };