Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions audino/frontend/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import {
Labels,
LabelValues,
Data,
CreateUser
CreateUser,
LoginPage
} from './pages';
import NavBar from './containers/navbar';

Expand Down Expand Up @@ -142,11 +143,12 @@ class App extends React.Component {
// window.location.href.includes("/newUser")
return <Redirect {...props} to="/newUser" />;
}
return <Home {...props} />;
return <Home {...props} history={history}/>;
}
return <Redirect {...props} to="/dashboard" />;
}}
/>
<PublicRoute exact path="/login" component={LoginPage} history={history} />
<PublicRoute exact path="/newUser" component={CreateUser} />
<Route path="/empty" component={null} key="empty" />
<PrivateRoute exact path="/admin" component={Admin} />
Expand Down
35 changes: 31 additions & 4 deletions audino/frontend/src/containers/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class NavBar extends React.Component {
const isAdmin = store.get('isAdmin');

return (
<nav className="navbar navbar-expand-md bg-dark navbar-dark">
<Link to="/" className="navbar-brand">
<nav className="navbar navbar-expand-md bg-dark navbar-dark" >
<Link to="/" className="navbar-brand" style={{marginRight: 0}}>
Pyrenote
</Link>

Expand All @@ -45,12 +45,21 @@ class NavBar extends React.Component {
type="button"
data-toggle="collapse"
data-target="#collapsibleNavbar"
style={{marginLeft: 0}}
>
<span className="navbar-toggler-icon" />
</button>


<div className="collapse navbar-collapse" id="collapsibleNavbar"
style={{
marginLeft: 0,
justifyContent: "right"

}}
>
{isUserLoggedIn && (
<div className="collapse navbar-collapse" id="collapsibleNavbar">

<ul className="navbar-nav">
<li className="nav-item">
<Link className="nav-link" to="/dashboard">
Expand All @@ -74,8 +83,26 @@ class NavBar extends React.Component {
</button>
</li>
</ul>
</div>
)}

{!isUserLoggedIn && window.location.href.includes('/login') && (
<ul className="navbar-nav">
<li className="nav-item">
<Link className="nav-link" to="/">
Head back to landing page!
</Link>
</li>
</ul>
) || (
<ul className="navbar-nav">
<li className="nav-item">
<Link className="nav-link" to="/login">
login
</Link>
</li>
</ul>
)}
</div>
</nav>
);
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added audino/frontend/src/images/Lyrebird.jpg
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.
40 changes: 40 additions & 0 deletions audino/frontend/src/images/Sdzwa-green.svg
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.
23 changes: 23 additions & 0 deletions audino/frontend/src/pages/LoginPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import LoginForm from '../containers/forms/loginForm';
import { Button } from '../components/button';

const LoginPage = () => {
return (
<div className="container h-75 text-center">
<div className="row h-100 justify-content-center align-items-center">
<LoginForm />
<Button
size="lg"
type="primary"
onClick={() => {
window.location.href = `/newUser`;
}}
text="No Account? Sign up here!"
/>
</div>
</div>
);
};

export default LoginPage;
Loading