revite/src/pages/login/forms/FormCreate.tsx

17 lines
420 B
TypeScript
Raw Normal View History

import { AppContext } from "../../../context/revoltjs/RevoltClient";
import { useContext } from "preact/hooks";
2021-06-18 15:21:54 -04:00
import { Form } from "./Form";
export function FormCreate() {
2021-06-19 13:46:05 -04:00
const client = useContext(AppContext);
2021-06-18 15:21:54 -04:00
return (
<Form
page="create"
callback={async data => {
await client.register(import.meta.env.VITE_API_URL, data);
2021-06-18 15:21:54 -04:00
}}
/>
);
}