mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
25 lines
599 B
TypeScript
25 lines
599 B
TypeScript
|
import { useState, FC } from "react";
|
||
|
import { KeyIcon } from "@heroicons/react/24/outline";
|
||
|
// components
|
||
|
import { EmailCodeForm, EmailPasswordForm } from "components/account";
|
||
|
|
||
|
export interface EmailSignInFormProps {
|
||
|
handleSuccess: () => void;
|
||
|
}
|
||
|
|
||
|
export const EmailSignInForm: FC<EmailSignInFormProps> = (props) => {
|
||
|
const { handleSuccess } = props;
|
||
|
// states
|
||
|
const [useCode, setUseCode] = useState(true);
|
||
|
|
||
|
return (
|
||
|
<>
|
||
|
{useCode ? (
|
||
|
<EmailCodeForm onSuccess={handleSuccess} />
|
||
|
) : (
|
||
|
<EmailPasswordForm onSuccess={handleSuccess} />
|
||
|
)}
|
||
|
</>
|
||
|
);
|
||
|
};
|