-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
23,930 additions
and
84 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
/build | ||
|
||
# misc | ||
.env | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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,38 +0,0 @@ | ||
.App { | ||
text-align: center; | ||
} | ||
|
||
.App-logo { | ||
height: 40vmin; | ||
pointer-events: none; | ||
} | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
.App-logo { | ||
animation: App-logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.App-header { | ||
background-color: #282c34; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
color: white; | ||
} | ||
|
||
.App-link { | ||
color: #61dafb; | ||
} | ||
|
||
@keyframes App-logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
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,25 +1,73 @@ | ||
import logo from './logo.svg'; | ||
import './App.css'; | ||
import "./App.css"; | ||
import firebaseAuth from "./provider/AuthProvider"; | ||
import Home from "./components/home page/home"; | ||
import Signin from "./components/Signin page/signin"; | ||
import { | ||
BrowserRouter as Router, | ||
Route, | ||
useHistory, | ||
Redirect, | ||
Switch, | ||
} from "react-router-dom"; | ||
import React, { Component, useContext } from "react"; | ||
|
||
function App() { | ||
/*function App() { | ||
const {handleSignup,handleSignin,inputs,setInputs,errors} = useContext(firebaseAuth) | ||
console.log(handleSignup) | ||
const handleSubmit = (e) => { | ||
e.preventDefault() | ||
return(handleSignin()) | ||
} | ||
const handleChange = e => { | ||
const {name, value} = e.target | ||
setInputs(prev => ({...prev, [name]: value})) | ||
} | ||
return ( | ||
<div className="App"> | ||
<header className="App-header"> | ||
<img src={logo} className="App-logo" alt="logo" /> | ||
<p> | ||
Edit <code>src/App.js</code> and save to reload. | ||
</p> | ||
<a | ||
className="App-link" | ||
href="https://reactjs.org" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Learn React | ||
</a> | ||
</header> | ||
</div> | ||
<form onSubmit={handleSubmit}> | ||
signin | ||
<input onChange={handleChange} name="email" placeholder='email' value={inputs.email} /> | ||
<input onChange={handleChange} name="password" placeholder='password' value={inputs.password} /> | ||
<button>signin</button> | ||
</form> | ||
); | ||
} | ||
export default App;*/ | ||
class App extends Component { | ||
constructor() { | ||
super(); | ||
this.changeHomePage = this.changeHomePage.bind(this); | ||
this.changeSigninPage=this.changeSigninPage.bind(this); | ||
} | ||
|
||
changeHomePage() { | ||
console.log("change home called"); | ||
this.setState({ redirect: "/home" }); | ||
} | ||
|
||
changeSigninPage() { | ||
console.log("change signin called"); | ||
this.setState({ redirect: "/" }); | ||
} | ||
|
||
state = { | ||
redirect: "", | ||
}; | ||
render() { | ||
return ( | ||
<React.Fragment> | ||
<Redirect to={this.state.redirect} /> | ||
<Switch> | ||
<Route exact path="/"> | ||
<Signin changeHomePage={this.changeHomePage} /> | ||
</Route> | ||
<Route exact path="/home"> | ||
<Home changeSigninPage={this.changeSigninPage} /> | ||
</Route> | ||
</Switch> | ||
</React.Fragment> | ||
); | ||
} | ||
} | ||
|
||
export default App; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.