diff --git a/config.env b/config.env new file mode 100644 index 0000000..9214b52 --- /dev/null +++ b/config.env @@ -0,0 +1,2 @@ + +./package-lock.json \ No newline at end of file diff --git a/server/.gitignore b/server/.gitignore index 0326a4c..ffe0868 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -1,3 +1,4 @@ config.env /node_modules -package-lock.json \ No newline at end of file +package-lock.json +config.env \ No newline at end of file diff --git a/server/config/DBconnect.js b/server/config/DBconnect.js index bd4b6d6..cbc68f3 100644 --- a/server/config/DBconnect.js +++ b/server/config/DBconnect.js @@ -5,7 +5,7 @@ const connectDB = async () => { await mongoose.connect(process.env.DATABASE_URL); console.log("Connected To MongoDB"); } catch (err) { - console.log("DB Disconnected"); + console.log(err) process.exit(1); } }; diff --git a/server/index.js b/server/index.js index 1d0ccd4..8bcd57b 100644 --- a/server/index.js +++ b/server/index.js @@ -10,7 +10,7 @@ import StripeRouter from './routes/Stripe-route.js'; const app=express(); -dotenv.config({path:'./config.env'}); +dotenv.config({path:'./config.env'}) connectDB(); @@ -33,7 +33,6 @@ app.use('/api',StripeRouter); const port=process.env.PORT||7000; - app.listen(port,()=>{ console.log(`Server is running on port ${port}`); }) \ No newline at end of file diff --git a/src/Pages/Login.jsx b/src/Pages/Login.jsx index 5bac6bd..3f579bf 100644 --- a/src/Pages/Login.jsx +++ b/src/Pages/Login.jsx @@ -1,47 +1,124 @@ -import React, { useState } from "react"; +import React, { useEffect, useState } from "react"; import { Link, useNavigate } from "react-router-dom"; import google from '../assets/google.png' +import { IoEyeOutline, IoEyeOffOutline } from "react-icons/io5"; + const Login = () => { const [active, setActive] = useState(true); - + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + const [isEmailValid, setIsEmailValid] = useState(false); + const [isPasswordValid, setIsPasswordValid] = useState(false); + const [isEmailFocused, setIsEmailFocused] = useState(false); + const [isPasswordFocused, setIsPasswordFocused] = useState(false); + const [isPasswordVisible, setIsPasswordVisible] = useState(false); const navigate = useNavigate(); - const handleClicked = () => { - navigate("/signup"); - }; + const handleLogin = async (e) => { + e.preventDefault(); + console.log(email," ",password); + } return (