Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

login feature redirect done #123

Merged
merged 3 commits into from
Oct 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
redirect login done
  • Loading branch information
Mehtarishita committed Oct 7, 2024
commit 43fdd49e2d9e3b6959f511556679a4c0cfb6882d
10 changes: 0 additions & 10 deletions frontend/src/Pages/LoginPage.jsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
import React, { useState } from 'react';
import logo from '../assets/stationsaarthi.svg'; // Import your logo
import { useNavigate } from 'react-router-dom';
<<<<<<< HEAD
import backicon from '../assets/svg/backicon.svg'; // Assuming you have a back icon
=======

>>>>>>> f79a0616cca434699eaa1820cb1a5370eac5632f
const Login = () => {
const [username, setUsername] = useState('');
const [password, setPassword] = useState('');
const navigate = useNavigate();
const RegisterClick = () => {
navigate('/Register'); // Navigates to the login page
}
<<<<<<< HEAD
const HomeClick = () => {
navigate('/'); // Navigates to the home page
}
=======
>>>>>>> f79a0616cca434699eaa1820cb1a5370eac5632f
const handleLogin = (e) => {
e.preventDefault();
// Handle login logic here
@@ -28,10 +21,7 @@ const Login = () => {
return (
<div className="flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-blue-100 to-blue-5000">
{/* Logo and Title */}
<<<<<<< HEAD
<div ><button onClick={HomeClick}><img src={backicon} alt="" srcset="" className='fixed left-[1vh] h-[9vh] w-auto' /></button></div>
=======
>>>>>>> f79a0616cca434699eaa1820cb1a5370eac5632f
<div className="mb-10 text-center ">
<img src={logo} alt="Station Saarthi Logo" className="w-20 mx-auto h-22 " />
<h1 className="mt-4 text-4xl font-bold text-gray-800 ">Station Saarthi</h1>
12 changes: 0 additions & 12 deletions frontend/src/Pages/Register.jsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
import React, { useState } from 'react';
import logo from '../assets/stationsaarthi.svg'; // Ensure the path is correct
import { useNavigate } from 'react-router-dom';
<<<<<<< HEAD
import backicon from '../assets/svg/backicon.svg';
=======

>>>>>>> f79a0616cca434699eaa1820cb1a5370eac5632f
const Register = () => {

const navigate = useNavigate();
const LoginClick = () => {
navigate('/Login'); // Navigates to the login page
};
<<<<<<< HEAD
const HomeClick = () => {
navigate('/'); // Navigates to the home page
};
=======
>>>>>>> f79a0616cca434699eaa1820cb1a5370eac5632f

const [name, setName] = useState('');
const [phoneNumber, setPhoneNumber] = useState('');
@@ -30,16 +23,11 @@ const Register = () => {
};

return (
<<<<<<< HEAD
<>

<div className="flex flex-col items-center justify-center min-h-screen px-4 bg-gradient-to-b from-blue-100 to-blue-5000">
{/* Logo and Title */}
<div ><button onClick={HomeClick}><img src={backicon} alt="" srcset="" className='fixed left-[1vh] h-[9vh] w-auto' /></button></div>
=======
<div className="flex flex-col items-center justify-center min-h-screen px-4 bg-gradient-to-b from-blue-100 to-blue-5000">
{/* Logo and Title */}
>>>>>>> f79a0616cca434699eaa1820cb1a5370eac5632f
<div className="mb-6 text-center">
<img src={logo} alt="Station Saarthi Logo" className="w-20 mx-auto mb-2 h-22" />
<h1 className="text-2xl font-bold text-gray-800">Station Saarthi</h1>