Skip to content
Snippets Groups Projects
Commit ccf27229 authored by Karel Hala's avatar Karel Hala
Browse files

Remove errors from console

parent 598242a2
No related branches found
No related tags found
No related merge requests found
...@@ -104,7 +104,7 @@ DataTable.propTypes = { ...@@ -104,7 +104,7 @@ DataTable.propTypes = {
}) })
), ),
initialized: PropTypes.bool, initialized: PropTypes.bool,
rest: PropTypes.string.isRequired, rest: PropTypes.string,
}; };
DataTable.defaultProps = { DataTable.defaultProps = {
......
...@@ -94,7 +94,7 @@ const NavBar = ({ open, handleOpen }) => { ...@@ -94,7 +94,7 @@ const NavBar = ({ open, handleOpen }) => {
</Typography> </Typography>
{isAuthenticated && ( {isAuthenticated && (
<IconButton color="inherit"> <IconButton color="inherit">
<Badge badgeContent={4} color="secondary"> <Badge badgeContent={4} color="secondary" overlap="rectangular">
<NotificationsIcon /> <NotificationsIcon />
</Badge> </Badge>
</IconButton> </IconButton>
......
...@@ -29,7 +29,7 @@ const Navigation = () => { ...@@ -29,7 +29,7 @@ const Navigation = () => {
return ( return (
<div> <div>
<RouterNavLink to="/home-page" className={clsx(styles.link)}> <RouterNavLink to="/home-page" className={clsx(styles.link)}>
<ListItem button selected={pathname === '/home-page' && !type ? 'selected' : null}> <ListItem button selected={pathname === '/home-page' && !type}>
<ListItemIcon> <ListItemIcon>
<WbSunnyIcon /> <WbSunnyIcon />
</ListItemIcon> </ListItemIcon>
...@@ -37,7 +37,7 @@ const Navigation = () => { ...@@ -37,7 +37,7 @@ const Navigation = () => {
</ListItem> </ListItem>
</RouterNavLink> </RouterNavLink>
<RouterNavLink to="/home-page?type=air" className={clsx(styles.link)}> <RouterNavLink to="/home-page?type=air" className={clsx(styles.link)}>
<ListItem button selected={pathname === '/home-page' && type === 'air' ? 'selected' : null}> <ListItem button selected={pathname === '/home-page' && type === 'air'}>
<ListItemIcon> <ListItemIcon>
<WavesIcon /> <WavesIcon />
</ListItemIcon> </ListItemIcon>
...@@ -45,14 +45,14 @@ const Navigation = () => { ...@@ -45,14 +45,14 @@ const Navigation = () => {
</ListItem> </ListItem>
</RouterNavLink> </RouterNavLink>
<RouterNavLink to="/home-page?type=temp" className={clsx(styles.link)}> <RouterNavLink to="/home-page?type=temp" className={clsx(styles.link)}>
<ListItem button selected={pathname === '/home-page' && type === 'temp' ? 'selected' : null}> <ListItem button selected={pathname === '/home-page' && type === 'temp'}>
<ListItemIcon> <ListItemIcon>
<AcUnitIcon /> <AcUnitIcon />
</ListItemIcon> </ListItemIcon>
<ListItemText primary="Temperture" /> <ListItemText primary="Temperture" />
</ListItem> </ListItem>
</RouterNavLink> </RouterNavLink>
<RouterNavLink to="/chart" className={({ isActive }) => [clsx(styles.link), isActive ? 'selected' : null].join(' ')}> <RouterNavLink to="/chart" className={clsx(styles.link)}>
<ListItem button selected={pathname === '/chart'}> <ListItem button selected={pathname === '/chart'}>
<ListItemIcon> <ListItemIcon>
<ShowChartIcon /> <ShowChartIcon />
......
...@@ -68,13 +68,13 @@ const HomePage = () => { ...@@ -68,13 +68,13 @@ const HomePage = () => {
return ( return (
<div> <div>
<h1>{typeMapper[type || '']}</h1> <h1>{typeMapper[type || '']}</h1>
<Grid container spacing={3} justify="space-between"> <Grid container spacing={3} justifyContent="space-between">
<Grid item> <Grid item>
<Autocomplete <Autocomplete
style={{ minWidth: '300px' }} style={{ minWidth: '300px' }}
options={restTypesMapper[type || '']} options={restTypesMapper[type || '']}
id="rest-type-picker" id="rest-type-picker"
value={rest} value={rest || ''}
onChange={(e, filter) => setRestApi(({ resource }) => ({ resource, rest: filter }))} onChange={(e, filter) => setRestApi(({ resource }) => ({ resource, rest: filter }))}
disabled={!initialized} disabled={!initialized}
renderInput={(params) => <TextField {...params} label="Select rest type" margin="normal" />} renderInput={(params) => <TextField {...params} label="Select rest type" margin="normal" />}
...@@ -83,7 +83,7 @@ const HomePage = () => { ...@@ -83,7 +83,7 @@ const HomePage = () => {
</Grid> </Grid>
<Toolbar> <Toolbar>
<Grid container spacing={3} justify="space-between"> <Grid container spacing={3} justifyContent="space-between">
<Grid item> <Grid item>
<Autocomplete <Autocomplete
style={{ minWidth: '150px' }} style={{ minWidth: '150px' }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment