Skip to content

Commit

Permalink
remove lesson pool tab for students, small styling changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cidneyweng committed Feb 17, 2021
1 parent 82e7ee1 commit 969b0b3
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 29 deletions.
2 changes: 1 addition & 1 deletion client/src/components/AuthComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const AuthComponent = props => {
} else {
return (
<div>
<NavBar />
<NavBar isMentor={mentor} />
<Component ismentor={mentor} id={match.params.id} />
</div>
);
Expand Down
34 changes: 17 additions & 17 deletions client/src/components/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ import { NavLink } from 'react-router-dom';

const logo = require('../stylesheets/logo.png');

const NavBar = () => {
const NavBar = props => {
const { isMentor } = props;

const [drawerVisible, setDrawerVisible] = useState(false);
// constructor(props) {
// super(props);
// this.state = {
// drawerVisible: false,
// };
// }

const showDrawer = () => {
setDrawerVisible(true);
setDrawerVisible(true);
};

const hideDrawer = () => {
Expand All @@ -43,9 +39,11 @@ const NavBar = () => {
<Menu.Item className="menuItem" key="lessons">
<NavLink to="/SiteLessons">Site Material</NavLink>
</Menu.Item>
<Menu.Item className="menuItem" key="lessonpool">
<NavLink to="/LessonPool">Lesson Pool</NavLink>
</Menu.Item>
{isMentor && (
<Menu.Item className="menuItem" key="lessonpool">
<NavLink to="/LessonPool">Lesson Pool</NavLink>
</Menu.Item>
)}
<Menu.Item className="menuItem" key="roster">
<NavLink to="/Roster">Roster</NavLink>
</Menu.Item>
Expand Down Expand Up @@ -90,11 +88,13 @@ const NavBar = () => {
Site Material
</NavLink>
</Menu.Item>
<Menu.Item className="menuItem" key="lessonpool">
<NavLink onClick={hideDrawer} to="/LessonPool">
Lesson Pool
</NavLink>
</Menu.Item>
{isMentor && (
<Menu.Item className="menuItem" key="lessonpool">
<NavLink onClick={hideDrawer} to="/LessonPool">
Lesson Pool
</NavLink>
</Menu.Item>
)}
<Menu.Item className="menuItem" key="roster">
<NavLink onClick={hideDrawer} to="/Roster">
Roster
Expand All @@ -116,6 +116,6 @@ const NavBar = () => {
</nav>
);
}
}
};

export default NavBar;
7 changes: 6 additions & 1 deletion client/src/components/Profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ const Profile = () => {
</Row>
<Row>
<Col>
<Avatar size={64} onClick={() => showModal(true)} icon="edit" />
<Avatar
className="editIcon"
size={64}
onClick={() => showModal(true)}
icon="edit"
/>
<Modal
className="editModal"
title="Edit Your Profile"
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/RosterCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const { TextArea } = Input;
const RosterCard = props => {
const { mentor, person } = props;

const { id, username, email, candy, hobby, notes } = person;
const { id, username, email, candy, hobby, notes } = person; // TODO: fetch candy and hobby to display here!
const [showEditModal, setShowEditModal] = useState(false);
const [editedNotes, setEditedNotes] = useState('');
const [displayNotes, setDisplayNotes] = useState(notes);
Expand Down Expand Up @@ -53,8 +53,8 @@ const RosterCard = props => {
<div>
<h2>Name: {username}</h2>
<p>Email: {email}</p>
<p>Favorite Candy: {candy}</p>
<p>Favorite Hobby: {hobby}</p>
{/* <p>Favorite Candy: {candy}</p>
<p>Favorite Hobby: {hobby}</p> */}
<p>Notes: {displayNotes}</p>
</div>
);
Expand Down
3 changes: 2 additions & 1 deletion client/src/stylesheets/LessonPool.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@
.fxLessonPoolContainer {
padding-top: 100px;
background-color: #e6f4fc;
width: 100%;
width: 100vw;
height: 100%;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
Expand Down
10 changes: 8 additions & 2 deletions client/src/stylesheets/NavBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,16 @@
width: 100%;
}

.ant-btn-primary {
border-color: #e6f4fc;
}

@media (max-width: 767px) {
.barsMenu {
display: inline-block;
top: 10px;
display: flex;
justify-content: center;
align-items: center;
top: 5px;
}
.leftMenu,
.rightMenu {
Expand Down
12 changes: 11 additions & 1 deletion client/src/stylesheets/Profile.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}

@media (max-width: 767px) {
.profileBox{
.profileBox {
width: 80%;
}
}
Expand Down Expand Up @@ -160,6 +160,16 @@ input[type='submit']:hover {
opacity: 0.8;
}

.editIcon {
display: flex;
justify-content: center;
align-items: center;
}

.ant-avatar.ant-avatar-icon {
padding-top: 0px;
}

.editModal {
padding: 10px 10px;
}
Expand Down
3 changes: 2 additions & 1 deletion client/src/stylesheets/Roster.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
background-color: #e6f4fc;
margin: 0;
padding: 100px 10px;
width: 100%;
width: 100vw;
height: 100%;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
Expand Down
5 changes: 3 additions & 2 deletions client/src/stylesheets/SiteLessons.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}

@media (max-width: 767px) {
.lessonsContainer{
.lessonsContainer {
grid-template-columns: 100%;
}
}
Expand Down Expand Up @@ -53,8 +53,9 @@

.siteLessonsContainer {
background-color: #e6f4fc;
width: 100%;
width: 100vw;
height: 100%;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
Expand Down

0 comments on commit 969b0b3

Please sign in to comment.