Skip to content

Commit 7f38c69

Browse files
committed
Comment and clear warnings
1 parent f5bf7d2 commit 7f38c69

File tree

24 files changed

+55
-34
lines changed

24 files changed

+55
-34
lines changed

src/components/BreadCrumbs/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ const BreadCrumbs = () => {
4444
const [anchorEl, setAnchorEl] = React.useState(null)
4545

4646
const open = Boolean(anchorEl)
47+
// eslint-disable-next-line no-unused-vars
4748
const id = open ? 'add-section-popover' : undefined
49+
// eslint-disable-next-line no-unused-vars
4850
const handleClick = event => {
4951
setAnchorEl(open ? null : event.currentTarget)
5052
}
@@ -85,7 +87,8 @@ const BreadCrumbs = () => {
8587

8688

8789
// global
88-
var layoutState = useLayoutState()
90+
// eslint-disable-next-line no-unused-vars
91+
const layoutState = useLayoutState();
8992

9093
const handleChange = (event, newValue) => {
9194
setValue(newValue)
@@ -112,7 +115,9 @@ const BreadCrumbs = () => {
112115
wrap={'nowrap'}
113116
style={{ overflowX: 'auto' }}
114117
>
115-
{structure.map(c => {
118+
119+
{// eslint-disable-next-line
120+
structure.map(c => {
116121
if (
117122
window.location.hash.includes(c.link) &&
118123
c.link && c.label === "Dashboard"

src/components/Dot/Dot.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default function Dot({ size = "small", color, style }) {
3333
})}
3434
style={{
3535
backgroundColor:
36+
// eslint-disable-next-line no-mixed-operators
3637
color && (theme.palette.text[color] && theme.palette.text[color]) || color,
3738
...style
3839
}}

src/components/Header/Header.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default function Header(props) {
122122

123123
useEffect(() => {
124124
actions.doFind(sessionStorage.getItem('user_id'))(managementDispatch)
125-
}, [])
125+
}, [managementDispatch])
126126

127127
useEffect(function() {
128128
window.addEventListener("resize", handleWindowWidthChange);
@@ -233,6 +233,7 @@ export default function Header(props) {
233233
>
234234
<Avatar
235235
alt="Robert Cotton"
236+
/* eslint-disable-next-line no-mixed-operators */
236237
src={config.isBackend ? (managementValue.currentUser && managementValue.currentUser.avatar.length >=1 && managementValue.currentUser.avatar[managementValue.currentUser.avatar.length-1].publicUrl || profile) : profile}
237238
classes={{ root: classes.headerIcon }}
238239
/>

src/components/Layout/Layout.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ import {
1111
import {
1212
Fab,
1313
IconButton,
14-
Tab,
1514
} from '@material-ui/core'
16-
import { withStyles } from '@material-ui/styles'
1715

1816
// styles
1917
import useStyles from './styles'
@@ -76,6 +74,7 @@ import structure from '../Sidebar/SidebarStructure'
7674

7775
function Layout(props) {
7876
const classes = useStyles()
77+
// eslint-disable-next-line no-unused-vars
7978
const [value, setValue] = React.useState(2)
8079
const [anchorEl, setAnchorEl] = React.useState(null)
8180

@@ -86,12 +85,14 @@ function Layout(props) {
8685
}
8786

8887
// global
89-
var layoutState = useLayoutState()
88+
const layoutState = useLayoutState();
9089

90+
// eslint-disable-next-line no-unused-vars
9191
const handleChange = (event, newValue) => {
9292
setValue(newValue)
9393
}
9494

95+
// eslint-disable-next-line no-unused-vars
9596
function a11yProps(index) {
9697
return {
9798
id: `simple-tab-${index}`,

src/components/Widget/styles.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Hidden } from "@material-ui/core";
21
import { makeStyles } from "@material-ui/styles";
32

43
export default makeStyles(theme => ({

src/components/Wrappers/Wrappers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ function getColor(color, theme, brightness = "main") {
367367
}
368368
}
369369

370+
// eslint-disable-next-line no-unused-vars
370371
function getColorText (color, theme) {
371372
if (color && theme.palette.text[color]) {
372373
return theme.palette.text[color];

src/pages/draggablegrid/Components/NewsWidget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import React from 'react';
22
import { withStyles } from '@material-ui/core/styles';
33
import { Typography } from '@material-ui/core';
44
import mock from '../mock';

src/pages/draggablegrid/Components/SharesWidget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import React from 'react';
22
import { withStyles } from '@material-ui/core/styles';
33

44
import Dot from '../../../components/Dot/Dot';

src/pages/draggablegrid/DraggableGrid.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React, { useState } from 'react';
1+
import React from 'react';
22
import { Grid, Typography } from '@material-ui/core';
3-
import { useTheme, makeStyles } from '@material-ui/styles';
3+
import { useTheme } from '@material-ui/styles';
44
import Widget from '../../components/Widget';
55
import Sortable from 'react-sortablejs'
66
// Components
@@ -16,8 +16,9 @@ import mock from './mock';
1616
import useStyles from "./styles";
1717

1818
function DraggableGrid() {
19-
var classes = useStyles();
20-
var theme = useTheme();
19+
const classes = useStyles();
20+
// eslint-disable-next-line no-unused-vars
21+
const theme = useTheme();
2122

2223
return (
2324
<Grid container spacing={4} className={classes.root}>

src/pages/draggablegrid/mock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default {
5353
background: '#536DFE',
5454
icon: 'microphone',
5555
title: 'Light Blue reached $300',
56-
description: 'Light Blue Inc. shares just hit $300 price. \"This was inevitable. It should have happen sooner or later\" - says NYSE expert.',
56+
description: 'Light Blue Inc. shares just hit $300 price. "This was inevitable. It should have happen sooner or later" - says NYSE expert.',
5757
date: 'Sep 25, 11:59'
5858
},
5959
{

0 commit comments

Comments
 (0)