import * as React from 'react'; import { Link, useSearchParams } from 'react-router-dom'; import { Button } from '@/components/ui/button'; import { Form, Input, Select, Label, Switch } from '@/components/ui/form'; import { useRegister, registerInputSchema } from '@/lib/auth'; import { Team } from '@/types/api'; type RegisterFormProps = { onSuccess: () => void; chooseTeam: boolean; setChooseTeam: () => void; teams?: Team[]; }; export const RegisterForm = ({ onSuccess, chooseTeam, setChooseTeam, teams, }: RegisterFormProps) => { const registering = useRegister({ onSuccess }); const [searchParams] = useSearchParams(); const redirectTo = searchParams.get('redirectTo'); return (