Spaces:
Running
Running
File size: 3,160 Bytes
99be3c0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | ```javascript
import React from 'react';
import { useNavigate } from 'react-router-dom';
const Login = () => {
const navigate = useNavigate();
const handleSubmit = (e) => {
e.preventDefault();
// Simulate successful login
navigate('/dashboard');
};
return (
<div className="gradient-bg min-h-screen flex items-center justify-center p-4">
<div className="login-glass p-8 max-w-md w-full">
<div className="text-center mb-8">
<i data-feather="box" className="w-12 h-12 text-white mx-auto"></i>
<h1 className="text-3xl font-bold text-white mt-4">AppVoyage</h1>
<p className="text-white opacity-80">Discover & manage your digital tools</p>
</div>
<form onSubmit={handleSubmit} className="space-y-6">
<div>
<label htmlFor="email" className="block text-sm font-medium text-white">Email</label>
<div className="mt-1 relative">
<input id="email" name="email" type="email" required
className="py-3 px-4 block w-full bg-white bg-opacity-20 border border-white border-opacity-30 rounded-lg text-white placeholder-white placeholder-opacity-70 focus:outline-none focus:ring-2 focus:ring-white focus:border-transparent" />
<i data-feather="mail" className="absolute right-3 top-3 text-white opacity-70"></i>
</div>
</div>
<div>
<label htmlFor="password" className="block text-sm font-medium text-white">Password</label>
<div className="mt-1 relative">
<input id="password" name="password" type="password" required
className="py-3 px-4 block w-full bg-white bg-opacity-20 border border-white border-opacity-30 rounded-lg text-white placeholder-white placeholder-opacity-70 focus:outline-none focus:ring-2 focus:ring-white focus:border-transparent" />
<i data-feather="lock" className="absolute right-3 top-3 text-white opacity-70"></i>
</div>
</div>
<div className="flex items-center justify-between">
<div className="flex items-center">
<input id="remember-me" name="remember-me" type="checkbox"
className="h-4 w-4 bg-white bg-opacity-20 border border-white rounded focus:ring-white" />
<label htmlFor="remember-me" className="ml-2 block text-sm text-white">Remember me</label>
</div>
<div className="text-sm">
<a href="#" className="font-medium text-white hover:text-opacity-80">Forgot password?</a>
</div>
</div>
<div>
<button type="submit"
className="w-full flex justify-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-sm font-medium text-purple-700 bg-white hover:bg-opacity-90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-white transition-transform hover:scale-105">
Sign in
</button>
</div>
</form>
</div>
</div>
);
};
export default Login;
``` |