Skip to content

Commit bbdc9e9

Browse files
Merge pull request #523 from jeetvasoya21/#514
#514 done
2 parents ca71a6c + ac21d82 commit bbdc9e9

2 files changed

Lines changed: 18 additions & 13 deletions

File tree

src/pages/Login/Login.tsx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useState, ChangeEvent, FormEvent, useContext } from "react";
22
import axios from "axios";
33
import { useNavigate, Link } from "react-router-dom";
4+
import { motion } from "framer-motion";
45
import { ThemeContext } from "../../context/ThemeContext";
56
import type { ThemeContextType } from "../../context/ThemeContext";
67
import { useUser } from "../../context/UserContext";
@@ -87,7 +88,12 @@ const Login: React.FC = () => {
8788

8889
<div className="relative w-full max-w-md px-4 sm:px-6">
8990
{/* Branding */}
90-
<div className="text-center mb-10">
91+
<motion.div
92+
initial={{ opacity: 0, y: -20 }}
93+
animate={{ opacity: 1, y: 0 }}
94+
transition={{ duration: 0.6 }}
95+
className="text-center mb-10"
96+
>
9197
<div className="inline-flex items-center justify-center w-20 h-20 bg-white rounded-3xl mb-6 shadow-2xl transform hover:scale-105 transition-transform duration-300 overflow-hidden">
9298
<img
9399
src="/crl-icon.png"
@@ -110,15 +116,16 @@ const Login: React.FC = () => {
110116
>
111117
Track your GitHub journey
112118
</p>
113-
</div>
119+
</motion.div>
114120

115121
{/* Form Card */}
116-
<div
122+
<motion.div
123+
initial={{ opacity: 0, y: 30 }}
124+
animate={{ opacity: 1, y: 0 }}
125+
transition={{ duration: 0.6, delay: 0.2 }}
117126
className={`rounded-3xl p-6 sm:p-10 shadow-2xl border ${mode === "dark" ? "bg-white/10 backdrop-blur-xl border-white/20 text-white" : "bg-white border-gray-200 text-black"}`}
118127
>
119-
<h2
120-
className={`text-2xl font-bold text-center mb-8 ${mode === "dark" ? "text-white" : "text-gray-800"}`}
121-
>
128+
<h2 className={`text-2xl font-bold text-center mb-8 ${mode === "dark" ? "text-white" : "text-gray-800"}`}>
122129
Welcome Back
123130
</h2>
124131

@@ -197,12 +204,10 @@ const Login: React.FC = () => {
197204
</Link>
198205
</p>
199206
</div>
200-
</div>
207+
</motion.div>
201208
</div>
202209

203-
<div
204-
className={`${mode === "dark" ? "from-slate-900" : "from-slate-100"} absolute bottom-0 left-0 w-full h-20 bg-gradient-to-t to-transparent`}
205-
/>
210+
<div className={`${mode === "dark" ? "from-slate-900" : "from-slate-100"} absolute bottom-0 left-0 w-full h-20 bg-gradient-to-t to-transparent pointer-events-none`} />
206211
</div>
207212
);
208213
};

src/pages/Signup/Signup.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,10 @@ const SignUp: React.FC = () => {
287287

288288
<div className="text-center mt-8">
289289
<p className={mode === "dark" ? "text-gray-300" : "text-gray-600"}>
290-
Already have an account?{" "}
290+
Already have an account?
291291
<Link
292292
to="/login"
293-
className={`font-medium hover:underline transition-colors duration-300 ${mode === "dark" ? "text-white" : "text-black"}`}
293+
className="ml-1 text-purple-400 hover:text-purple-300 transition-colors duration-300"
294294
>
295295
Sign in here
296296
</Link>
@@ -302,7 +302,7 @@ const SignUp: React.FC = () => {
302302
<div
303303
className={`${
304304
mode === "dark" ? "from-slate-900" : "from-slate-100"
305-
} absolute bottom-0 left-0 w-full h-20 bg-gradient-to-t to-transparent`}
305+
} absolute bottom-0 left-0 w-full h-20 bg-gradient-to-t to-transparent pointer-events-none`}
306306
/>
307307
</div>
308308
);

0 commit comments

Comments
 (0)