Skip to content

Commit

Permalink
Merge pull request #2 from SSameer20/sameer/frontend
Browse files Browse the repository at this point in the history
authentication
  • Loading branch information
SSameer20 authored Jun 25, 2024
2 parents e7c0af3 + 1d0298e commit 77b4a34
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
29 changes: 29 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.7.2",
"framer-motion": "^11.2.11",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
11 changes: 10 additions & 1 deletion client/src/components/Authentication.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
import React, { useState } from 'react'
import { useNavigate } from "react-router-dom"
import "../styles/authentication.css"
import axios from 'axios'

export default function Authentication() {
const navigate = useNavigate();
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");

const loginBtn = (e) => {
console.log(email + " " + password)
axios.post("http://localhost:3001/home/login",{
Email : email,
Password : password
})
.then(data => console.log(data))
.error(er => console.log("Error"));



navigate("/app")
}

Expand Down
12 changes: 12 additions & 0 deletions server/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const express = require('express')
const app = express();


// Middle Ware



// Routes


// Listen

0 comments on commit 77b4a34

Please sign in to comment.