From 2229adf372e68e51e00258903d4023dc829fe3cb Mon Sep 17 00:00:00 2001 From: Kartavya Sharma Date: Sat, 31 Dec 2022 15:51:36 -0800 Subject: [PATCH] Removed animation --- backend/src/app.ts | 2 +- frontend/rmembr/src/components/auth/login.tsx | 162 +++++++++--------- 2 files changed, 82 insertions(+), 82 deletions(-) diff --git a/backend/src/app.ts b/backend/src/app.ts index 5363d25..35c7112 100644 --- a/backend/src/app.ts +++ b/backend/src/app.ts @@ -100,4 +100,4 @@ export default class App { * DB instance. */ private _db: Db; -} \ No newline at end of file +} diff --git a/frontend/rmembr/src/components/auth/login.tsx b/frontend/rmembr/src/components/auth/login.tsx index 0782fe5..dfaf6ea 100644 --- a/frontend/rmembr/src/components/auth/login.tsx +++ b/frontend/rmembr/src/components/auth/login.tsx @@ -2,89 +2,10 @@ import React, { useState, ReactElement } from "react"; import { motion, AnimatePresence } from "framer-motion"; import Footer from "../../components/landing/footer"; -const InAnimation = { - key: "sign-in", - initial: { - y: "30%", - opacity: 0, - scale: 0.5, - }, - animate: { - y: 0, - opacity: 1, - scale: 1, - }, - exit: { - x: "-50%", - opacity: 0, - transition: { - duration: 1.2, - }, - }, - transition: { - delay: 0.2, - duration: 1.2, - ease: "easeOut", - }, -}; - -const OutAnimation = { - key: "sign-up", - initial: { - y: "30%", - opacity: 0, - scale: 0.5, - }, - animate: { - y: 0, - opacity: 1, - scale: 1, - }, - exit: { - x: "-50%", - opacity: 0, - transition: { - delay: 0.4, - duration: 1.2, - }, - }, - transition: { - delay: 1.5, - duration: 1.2, - ease: "easeOut", - }, -}; - -const TextAnimation = { - key: "text", - initial: { - x: "30%", - opacity: 0, - scale: 0.5, - }, - animate: { - x: 0, - opacity: 1, - scale: 1, - }, - exit: { - x: "-50%", - opacity: 0, - transition: { - duration: 1.2, - }, - }, - transition: { - delay: 0.2, - duration: 1.2, - ease: "easeOut", - }, -}; - export default function Login(): ReactElement { const [isShown, setIsShown] = useState(true); - const toggleClick = () => { + const toggleAnimation = () => { setIsShown(!isShown); }; @@ -171,7 +92,7 @@ export default function Login(): ReactElement { @@ -307,3 +228,82 @@ export default function Login(): ReactElement { ); } + +const InAnimation = { + key: "sign-in", + initial: { + y: "30%", + opacity: 0, + scale: 0.5, + }, + animate: { + y: 0, + opacity: 1, + scale: 1, + }, + exit: { + x: "-50%", + opacity: 0, + transition: { + duration: 1.2, + }, + }, + transition: { + delay: 0.2, + duration: 1.2, + ease: "easeOut", + }, +}; + +const OutAnimation = { + key: "sign-up", + initial: { + y: "30%", + opacity: 0, + scale: 0.5, + }, + animate: { + y: 0, + opacity: 1, + scale: 1, + }, + exit: { + x: "-50%", + opacity: 0, + transition: { + delay: 0.4, + duration: 1.2, + }, + }, + transition: { + delay: 1.5, + duration: 1.2, + ease: "easeOut", + }, +}; + +const TextAnimation = { + key: "text", + initial: { + x: "30%", + opacity: 0, + scale: 0.5, + }, + animate: { + x: 0, + opacity: 1, + scale: 1, + }, + exit: { + x: "-50%", + opacity: 0, + transition: { + duration: 1.2, + }, + }, + transition: { + delay: 0.2, + duration: 1.2, + ease: "easeOut", + }, +};