forked from github/plane
b96d40f106
* style: sign in page * style: github and google sign * style: sign with code and password * style: not a member and not authorized for project setting * style: join project icon * chore: comment removed
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} />
|
|
)}
|
|
</>
|
|
);
|
|
};
|