43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
"use client";
|
|
import React from "react";
|
|
import LoginForm from "./LoginForm";
|
|
import { YellowSection } from "./YellowSection";
|
|
import { FaChevronLeft } from "react-icons/fa";
|
|
import { useRouter } from "next/navigation";
|
|
import { motion } from "framer-motion";
|
|
|
|
function SignIn() {
|
|
const router = useRouter();
|
|
|
|
return (
|
|
<section className="bg-white md:bg-yellow flex flex-col-reverse md:flex-row h-screen w-full items-stretch justify-center overflow-y-hidden">
|
|
<FaChevronLeft
|
|
className="cursor-pointer z-10 flex md:hidden absolute top-2 left-2"
|
|
onClick={() => router.refresh()}
|
|
/>
|
|
|
|
{/* Right Section */}
|
|
<div className="flex flex-1 items-center justify-center flex-col bg-white md:rounded-tl-[50px]">
|
|
<LoginForm />
|
|
</div>
|
|
|
|
|
|
<div className="max-md:flex max-md:flex-col md:hidden">
|
|
<motion.div
|
|
initial={{ y: 100, visibility: "hidden", opacity: 0 }} // Initial position above the viewport
|
|
animate={{ y: 0, visibility: "visible", opacity: 1 }} // Animate to the default position
|
|
transition={{ type: "spring", damping: 10, stiffness: 100 }} // Define transition animation
|
|
>
|
|
<YellowSection />
|
|
</motion.div>
|
|
</div>
|
|
|
|
<div className="md:flex w-[30%] hidden">
|
|
<YellowSection />
|
|
</div>
|
|
</section>
|
|
);
|
|
}
|
|
|
|
export default SignIn;
|