import { Input, message } from 'antd' import { useForm } from 'antd/lib/form/Form' import FormItem from 'antd/lib/form/FormItem' import axios from 'axios' import { useAppContext } from '../../contexts/AppContext' import { Button } from '../../elements/Button' import { Form } from '../../elements/Form' type NewUserForm = { username: string email: string password1: string password2: string } export const NewUser = () => { const { baseURL } = useAppContext() const [form] = useForm() const handleFinish = (user: NewUserForm) => { if (user.password1 !== user.password2) { message.error('passwords do not match') return } axios.post(`${baseURL}/dj-rest-auth/registration/`, user) } return (
{/* */}
) }