1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-09-21 04:20:37 +02:00
pingvin-share/src/pages/auth/signIn.tsx

22 lines
539 B
TypeScript
Raw Normal View History

2022-04-25 15:15:17 +02:00
import { useRouter } from "next/router";
import React, { useContext } from "react";
import AuthForm from "../../components/auth/AuthForm";
2022-04-28 15:31:37 +02:00
import Meta from "../../components/Meta";
2022-04-25 15:15:17 +02:00
import { IsSignedInContext } from "../../utils/auth.util";
const SignIn = () => {
const isSignedIn = useContext(IsSignedInContext);
const router = useRouter();
if (isSignedIn) {
router.replace("/");
} else {
2022-04-28 15:31:37 +02:00
return (
<>
<Meta title="Sign In" />
<AuthForm mode="signIn" />
</>
);
2022-04-25 15:15:17 +02:00
}
};
export default SignIn;