Skip to content

Commit 6589525

Browse files
committed
Fixed minor issues and updated readme
1 parent 153684c commit 6589525

File tree

7 files changed

+50
-52
lines changed

7 files changed

+50
-52
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
node_modules
22
.DS_Store
3-
package-lock.json
3+
package-lock.json
4+
build
5+
.vscode

README.md

Lines changed: 18 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,41 @@
1+
# Reactjs Dashboard Example
2+
13
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
24

35
## Available Scripts
46

5-
In the project directory, you can run:
67

78
### `npm start`
89

9-
Runs the app in the development mode.<br />
10+
This will run the app in the development mode.<br />
1011
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
1112

12-
The page will reload if you make edits.<br />
13-
You will also see any lint errors in the console.
14-
15-
### `npm test`
16-
17-
Launches the test runner in the interactive watch mode.<br />
18-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
19-
2013
### `npm run build`
2114

2215
Builds the app for production to the `build` folder.<br />
2316
It correctly bundles React in production mode and optimizes the build for the best performance.
2417

25-
The build is minified and the filenames include the hashes.<br />
26-
Your app is ready to be deployed!
27-
28-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
29-
30-
### `npm run eject`
31-
32-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
33-
34-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
35-
36-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
37-
38-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
39-
40-
## Learn More
41-
42-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
43-
44-
To learn React, check out the [React documentation](https://reactjs.org/).
45-
46-
### Code Splitting
47-
48-
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
49-
50-
### Analyzing the Bundle Size
5118

52-
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
19+
## Live Demo
5320

54-
### Making a Progressive Web App
21+
You can see the working demo of this app by clicking on [this link](https://github.com/ms-yogi/reactjs-dashboard). All data used to populate charts is a mock data saved in the json file in the same project.
5522

56-
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
5723

58-
### Advanced Configuration
24+
## Inspiration
5925

60-
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
26+
For this app, following design template has been used
27+
![Dashboard Design Template](web_dashboard.png)
6128

62-
### Deployment
29+
## Libraries Used
6330

64-
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
31+
- [node-sass](https://github.com/sass/node-sass)
32+
- [momentjs](https://momentjs.com/)
33+
- [bootstrap](https://getbootstrap.com/)
34+
- [react-bootstrap](https://react-bootstrap.github.io/)
35+
- [react-router-dom](https://reacttraining.com/react-router/web/guides/quick-start)
36+
- [recharts](http://recharts.org/en-US/)
37+
- [eslint](https://eslint.org/)
6538

66-
### `npm run build` fails to minify
6739

68-
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
40+
## For any suggestions
41+
Please reach out!

src/App.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import Sidebar from './components/Sidebar'
33
import Navbar from './components/Navbar'
4-
import { BrowserRouter as Router, Switch, Route, Redirect } from 'react-router-dom'
4+
import { HashRouter as Router, Switch, Route, Redirect } from 'react-router-dom'
55
import { routes } from './utils/routes'
66
import userdata from './data/user.json'
77
import './styles/common.scss'
@@ -11,7 +11,9 @@ const App = () => {
1111
<>
1212
<Router>
1313
<div className='wrapper'>
14-
<Sidebar user={userdata.user}></Sidebar>
14+
<div className="sidebar-container">
15+
<Sidebar user={userdata.user}></Sidebar>
16+
</div>
1517
<div className='section-container'>
1618
<Navbar />
1719
<div className="section-view">

src/components/Sidebar/Sidebar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const Sidebar = props => {
4040

4141
return (
4242
<>
43-
<div className="sidebar-container">
43+
<div className="sidebar">
4444
<div className='navbar-border'>
4545
<a href='/'>
4646
<img

src/components/Sidebar/sidebar.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
@import '../../styles/colors';
22

3-
.sidebar-container {
4-
position: fixed;
3+
.sidebar {
54
overflow-x: hidden;
65
width: 20rem;
7-
height: 100vh;
6+
height: 100%;
87
border-right: 1px solid $border-color;
98
z-index: 100;
109
color: $primary-text;

src/styles/common.scss

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@import './colors';
2+
3+
.wrapper {
4+
display: flex;
5+
6+
.sidebar-container {
7+
width: 25rem;
8+
}
9+
10+
.section-container {
11+
// width: 100%;
12+
// padding-left: 20%;
13+
width: auto;
14+
}
15+
16+
.section-view {
17+
background-color: $light-background-color;
18+
padding: 2rem;
19+
// height: 100vh;
20+
// overflow-y: scroll;
21+
}
22+
}

web_dashboard.png

320 KB
Loading

0 commit comments

Comments
 (0)