revite/src/pages/login/forms/FormCreate.tsx
Paul ec97dbebd0 Hide client behind context.
Use idb for saving data.
Allow logins.
2021-06-18 22:47:25 +01:00

16 lines
424 B
TypeScript

import { AppContext } from "../../../context/revoltjs/RevoltClient";
import { useContext } from "preact/hooks";
import { Form } from "./Form";
export function FormCreate() {
const { client } = useContext(AppContext);
return (
<Form
page="create"
callback={async data => {
await client.register(import.meta.env.VITE_API_URL, data);
}}
/>
);
}