Skip to content

Commit

Permalink
fix errors in main/index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shankj3 committed Oct 27, 2020
1 parent 10b27cb commit 03af54d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions app/javascript/components/Main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ function Main(props) {
disableFocusRipple
disableTouchRipple
className={classes.navBarItem}
onClick={() => (window.location.href = '/admin')}
onClick={() => {
window.location.href = '/admin';
}}
>
<ExitToAppIcon />
<div className={classes.navText}> Admin View </div>
Expand All @@ -80,6 +82,7 @@ function Main(props) {
case 'Assessments':
return <BarChartIcon />;
default:
return null;
}
};

Expand Down Expand Up @@ -126,6 +129,7 @@ function Main(props) {
<ActionItemCreationPage {...contentProps}></ActionItemCreationPage>
);
default:
return null;
}
};

Expand Down Expand Up @@ -160,13 +164,12 @@ function Main(props) {
<div className={classes.navText}> Sign Out </div>
</ListItem>
{props.isAdmin ? renderAdminButton() : null}
{props.userType !== 'participant'
? Object.entries({
{props.userType !== 'participant' &&
Object.entries({
Dashboard: '/',
'Bulk Assign': '/assignments',
Assessments: '/studio_assessments',
}).map(n => getButton(n[0], n[1]))
: null}
Assessments: '/studio_assessments',
}).map(n => getButton(n[0], n[1]))}
</List>
</Grid>
<Grid
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"axios": "^0.19.0",
"babel-eslint": "^10.0.3",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"dotenv": "^8.2.0",
"date-fns": "^2.12.0",
"dotenv": "^8.2.0",
"draft-js": "^0.11.2",
"draft-js-plugins-editor": "^3.0.0",
"draftail": "^1.3.0",
Expand Down

0 comments on commit 03af54d

Please sign in to comment.