index.js
497 Bytes
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import Layout from "../../../components/layout/Layout";
import Login from "../../../components/login/Login";
export default function LoginPage() {
const router = useRouter();
const [loginType, setLoginType] = useState("");
useEffect(() => {
setLoginType(router?.query?.type)
}, [router])
return (
<Layout>
<Login type={loginType} />
</Layout>
);
};