-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from rajpanjabi/kawshar
Kawshar
- Loading branch information
Showing
4 changed files
with
29 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,52 @@ | ||
|
||
|
||
import React, { useState } from "react"; | ||
import { BrowserRouter, Route, Link } from "react-router-dom"; | ||
|
||
import "./SignIn.css" | ||
import {useNavigate} from "react-router-dom"; | ||
import Header from '../Header'; | ||
|
||
|
||
function SignIn(){ | ||
|
||
let navigate = useNavigate(); | ||
|
||
|
||
const [name,setName]= useState(""); | ||
const [password, setPassword]= useState(""); | ||
|
||
|
||
function nameChange(event){ | ||
setName(event.target.value) | ||
|
||
|
||
|
||
} | ||
function passChange(event){ | ||
setPassword(event.target.value) | ||
|
||
|
||
} | ||
|
||
function handleSignIn(e){ | ||
e.preventDefault(); | ||
console.log(e.target.name); | ||
console.log(e.target.password); | ||
|
||
|
||
|
||
console.log("I'm here") | ||
console.log(name); | ||
console.log(password); | ||
navigate('/browse'); | ||
|
||
|
||
} | ||
|
||
return( | ||
|
||
|
||
|
||
|
||
<div className="base" > | ||
|
||
<div className="net">Netflix</div> | ||
|
||
|
||
<div className="SignInContainer"> | ||
|
||
<h1 className="signintext">Sign In</h1> | ||
|
||
<form className="op" onSubmit={handleSignIn}> | ||
<div className="inputs"> | ||
<input className="backGrey" onChange={nameChange} type="text" placeholder="Email or phone number" value={name} ></input> | ||
<input className="backGrey" onChange={passChange} type="text" placeholder="Password" value={password} ></input> | ||
<input type="submit" className="redcol" value="Sign In"></input> | ||
</div> | ||
|
||
<div className="entLine"> | ||
|
||
<input type="checkbox"></input> | ||
<p>Remember me</p> | ||
|
||
<p className="help">Need help?</p> | ||
</div> | ||
|
||
<div className="NewNetf"> | ||
|
||
<p> New to Netflix? Sign Up now!</p> | ||
<p>This page is protected by Google reCAPTCHA to ensure you're not a bot. Learn more.</p> | ||
</div> | ||
|
||
</form> | ||
|
||
|
||
|
||
|
||
|
||
</div> | ||
|
||
|
||
</div>); | ||
|
||
|
||
|
||
} | ||
|
||
<div className="base"> | ||
<Header showButtons={false}/> | ||
<div className="SignInContainer"> | ||
<h1 className="signintext">Sign In</h1> | ||
<form className="op" onSubmit={handleSignIn}> | ||
<div className="inputs"> | ||
<input className="backGrey" onChange={nameChange} type="text" placeholder="Email or phone number" value={name} ></input> | ||
<input className="backGrey" onChange={passChange} type="text" placeholder="Password" value={password} ></input> | ||
<input type="submit" className="redcol" value="Sign In"></input> | ||
</div> | ||
<div className="entLine"> | ||
<input type="checkbox"></input> | ||
<p>Remember me</p> | ||
<p className="help">Need help?</p> | ||
</div> | ||
<div className="NewNetf"> | ||
<p> New to Netflix? Sign Up now!</p> | ||
<p>This page is protected by Google reCAPTCHA to ensure you're not a bot. Learn more.</p> | ||
</div> | ||
</form> | ||
</div> | ||
</div>); | ||
} | ||
|
||
export default SignIn; |