Skip to content

Commit 4980116

Browse files
committed
Add boilerplate for Profile component
1 parent 919bcc0 commit 4980116

File tree

4 files changed

+47
-2
lines changed

4 files changed

+47
-2
lines changed

client/src/containers/Dashboard/Dashboard.css

+20-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
padding: 0 20px;
88
align-items: center;
99
font-weight: 300;
10+
border-bottom: 1px solid #3f3f3f;
1011
}
1112
.btn-logout {
1213
transition: 0.3s;
@@ -16,10 +17,13 @@
1617
}
1718
.Dashboard__main {
1819
padding: 20px;
20+
display: flex;
21+
height: 90vh;
1922
}
2023
.Dashboard__sideDrawer {
21-
height: 84vh;
24+
height: 100%;
2225
width: 15vw;
26+
margin-right: 20px;
2327
border-radius: 10px;
2428
border: 1px solid #1d1d1d;
2529
color: #ddd;
@@ -44,15 +48,29 @@
4448
display: flex;
4549
flex-flow: column;
4650
align-items: flex-start;
47-
padding-left: 3rem;
51+
padding-left: 2rem;
4852
margin-top: 20%;
4953
height: 60%;
5054
justify-content: space-between;
5155
}
5256
.Dashboard__sideList__item{
5357
cursor: pointer;
58+
display: flex;
59+
align-items: center;
60+
}
61+
.Dashboard__sideList__item i {
62+
margin-right: 7px;
63+
font-size: 1.2rem;
5464
}
5565
.Dashboard__sideList__item:hover,
5666
.Dashboard__sideList__item--active {
5767
color: #fff;
5868
}
69+
70+
71+
.Dashboard__section {
72+
height: 100%;
73+
flex: 1;
74+
border-left: 1px solid #3f3f3f;
75+
padding-left: 20px;
76+
}

client/src/containers/Dashboard/Dashboard.jsx

+11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { Component, Fragment } from "react";
22
import { connect } from "react-redux";
33
import * as actionTypes from "../../store/actions/actionTypes";
4+
import Profile from "./Profile/Profile";
45
import "./Dashboard.css";
56
import qs from "qs";
67

@@ -18,6 +19,12 @@ class Dashboard extends Component {
1819
const query = qs.parse(this.props.location.search, {
1920
ignoreQueryPrefix: true
2021
});
22+
const iconClass = [
23+
"fas fa-chart-pie",
24+
"fas fa-user",
25+
"far fa-id-card",
26+
"fas fa-search"
27+
];
2128
let heading = "Dashboard";
2229
if (this.state.tabs.includes(query.tab)) {
2330
heading = query.tab;
@@ -29,10 +36,13 @@ class Dashboard extends Component {
2936
}
3037
return (
3138
<li key={i} className={listItemClasses.join(" ")}>
39+
<i className={iconClass[i]} />
3240
{item}
3341
</li>
3442
);
3543
});
44+
45+
let content = <Profile />;
3646
return (
3747
<Fragment>
3848
<nav className="Dashboard__nav">
@@ -47,6 +57,7 @@ class Dashboard extends Component {
4757
<hr />
4858
<ul className="Dashboard__sideList">{listItems}</ul>
4959
</aside>
60+
<section className="Dashboard__section">{content}</section>
5061
</main>
5162
</Fragment>
5263
);

client/src/containers/Dashboard/Profile/Profile.css

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React, {Component} from 'react';
2+
import "./Profile.css";
3+
4+
5+
class Profile extends Component {
6+
state = {}
7+
render() {
8+
return(
9+
<div className="Profile__container">
10+
Profile
11+
</div>
12+
);
13+
}
14+
}
15+
16+
export default Profile;

0 commit comments

Comments
 (0)