2021-02-15 12:05:43 +01:00
|
|
|
import React, { Component } from "react";
|
|
|
|
import { HashRouter as Router, Route, NavLink } from "react-router-dom";
|
|
|
|
import SignUpForm from "./pages/SignUpForm";
|
|
|
|
import SignInForm from "./pages/SignInForm";
|
2021-02-01 19:04:24 +01:00
|
|
|
|
2021-02-15 12:05:43 +01:00
|
|
|
import "./App.css";
|
|
|
|
|
|
|
|
class App extends Component {
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<Router basename="/react-auth-ui/">
|
|
|
|
<div className="App">
|
|
|
|
<div className="appAside" />
|
|
|
|
<div className="appForm">
|
|
|
|
<div className="pageSwitcher">
|
|
|
|
<NavLink
|
|
|
|
to="/sign-in"
|
|
|
|
activeClassName="pageSwitcherItem-active"
|
|
|
|
className="pageSwitcherItem"
|
|
|
|
>
|
|
|
|
Sign In
|
|
|
|
</NavLink>
|
|
|
|
<NavLink
|
|
|
|
exact
|
|
|
|
to="/"
|
|
|
|
activeClassName="pageSwitcherItem-active"
|
|
|
|
className="pageSwitcherItem"
|
|
|
|
>
|
|
|
|
Sign Up
|
|
|
|
</NavLink>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="formTitle">
|
|
|
|
<NavLink
|
|
|
|
to="/sign-in"
|
|
|
|
activeClassName="formTitleLink-active"
|
|
|
|
className="formTitleLink"
|
|
|
|
>
|
|
|
|
Sign In
|
|
|
|
</NavLink>{" "}
|
|
|
|
or{" "}
|
|
|
|
<NavLink
|
|
|
|
exact
|
|
|
|
to="/"
|
|
|
|
activeClassName="formTitleLink-active"
|
|
|
|
className="formTitleLink"
|
|
|
|
>
|
|
|
|
Sign Up
|
|
|
|
</NavLink>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<Route exact path="/" component={SignUpForm} />
|
|
|
|
<Route path="/sign-in" component={SignInForm} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Router>
|
|
|
|
);
|
|
|
|
}
|
2021-02-01 19:04:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export default App;
|