Skip to content
Open
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
68 changes: 0 additions & 68 deletions README.md

This file was deleted.

12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^3.9.2",
"@material-ui/icons": "^3.0.2",
"axios": "^0.18.0",
"logger": "^0.0.1",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-scripts": "2.1.3"
"react-redux": "^6.0.0",
"react-router-dom": "^4.3.1",
"react-scripts": "2.1.3",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"styled-components": "^4.1.3"
},
"scripts": {
"start": "react-scripts start",
Expand Down
54 changes: 36 additions & 18 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<!--
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />

<link
rel="stylesheet"
href="https://fonts.googleapis.com/icon?family=Material+Icons"
/>

<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500"
/>

<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.9/semantic.min.css"
/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.9/semantic.min.js"></script>

<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Expand All @@ -22,12 +40,12 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

Expand All @@ -37,5 +55,5 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</body>
</html>
32 changes: 0 additions & 32 deletions src/App.css

This file was deleted.

28 changes: 0 additions & 28 deletions src/App.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/App.test.js

This file was deleted.

12 changes: 12 additions & 0 deletions src/components/Home/Home.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import HomeContainer from '../../containers/home_containers';

const Home = () => {
return (
<div>
<HomeContainer />
</div>
);
};

export default Home;
100 changes: 100 additions & 0 deletions src/components/Navigation/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
import React from 'react';
import { withRouter } from 'react-router-dom';

import { withStyles } from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
import Button from '@material-ui/core/Button';

const styles = {
root: {
flexGrow: 1,
},
grow: {
flexGrow: 1,
},
menuButton: {
marginLeft: -12,
marginRight: 20,
},
};

const Navigation = props => {
const { classes } = props;

const sendToLogin = () => {
props.history.push('/login');
};
const sendToRegisterForm = () => {
props.history.push('/register');
};
const sendToLogout = () => {
props.history.push('/logout');
};
const renderNavBtn = () => {
if (localStorage.getItem('user')) {
return (
<Button
onClick={sendToLogout}
style={{ fontSize: '15px' }}
color="inherit">
Logout
</Button>
);
} else {
return (
<div>
<Button
onClick={sendToLogin}
style={{ fontSize: '15px' }}
color="inherit">
Login
</Button>
<Button
onClick={sendToRegisterForm}
style={{ fontSize: '15px' }}
color="inherit">
Register
</Button>
</div>
);
}
};
return (
<div className={classes.root}>
<AppBar position="sticky" style={{ marginBottom: '20px' }}>
<Toolbar>
<Typography
variant="h6"
color="inherit"
className={classes.grow}
style={{ fontSize: '30px' }}>
Tabless-Thursday
</Typography>
{/* <Button
onClick={sendToLogin}
style={{ fontSize: '15px' }}
color="inherit">
Login
</Button>
<Button
onClick={sendToLogout}
style={{ fontSize: '15px' }}
color="inherit">
Logout
</Button>
<Button
onClick={sendToRegisterForm}
style={{ fontSize: '15px' }}
color="inherit">
Register
</Button> */}
{renderNavBtn()}
</Toolbar>
</AppBar>
</div>
);
};

export default withRouter(withStyles(styles)(Navigation));
Loading