chore: codify React component style
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import type { FC } from "react";
|
||||
import { useLocation, useNavigate } from "react-router";
|
||||
import { useAuth } from "../model/auth";
|
||||
import { AuthForm } from "./AuthForm";
|
||||
|
||||
export function RegisterForm() {
|
||||
const RegisterForm: FC = () => {
|
||||
const { register } = useAuth();
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
const returnTo =
|
||||
(location.state as { returnTo?: string } | null)?.returnTo ?? "/accounts";
|
||||
|
||||
return (
|
||||
<AuthForm
|
||||
register
|
||||
@@ -17,4 +19,6 @@ export function RegisterForm() {
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export { RegisterForm };
|
||||
|
||||
Reference in New Issue
Block a user