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

17 lines
424 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() {
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
}}
/>
);
}