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

19 lines
424 B
TypeScript
Raw Normal View History

import { useContext } from "preact/hooks";
2021-07-05 06:23:23 -04:00
import { AppContext } from "../../../context/revoltjs/RevoltClient";
2021-06-18 15:21:54 -04:00
import { Form } from "./Form";
export function FormCreate() {
2021-07-05 06:25:20 -04:00
const client = useContext(AppContext);
2021-07-05 06:25:20 -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
}