Skip to content

Commit

Permalink
#16 Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vidhya-metacell committed Jul 26, 2022
1 parent 806236f commit be962bb
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 51 deletions.
127 changes: 77 additions & 50 deletions src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,41 +35,54 @@ const useStyles = makeStyles(() => ({

const Sidebar = () => {
const classes = useStyles();
const [selected, setSelected] = React.useState("1");
const [selected, setSelected] = React.useState('1');

return (
<Box className="sidebar">
<List disablePadding component="nav">
<ListItemButton selected={selected === "1"} onClick={() => setSelected("1")}>
<ListItemButton
selected={selected === '1'}
onClick={() => setSelected('1')}
>
<ListItemIcon>
{selected === "1" ? <img
src={`data:image/svg+xml;base64,${new Buffer(CursorActive).toString(
'base64'
)}`}
alt="icon"
/> : <img
src={`data:image/svg+xml;base64,${new Buffer(Cursor).toString(
'base64'
)}`}
alt="icon"
/>}
{selected === '1' ? (
<img
src={`data:image/svg+xml;base64,${new Buffer(
CursorActive
).toString('base64')}`}
alt="icon"
/>
) : (
<img
src={`data:image/svg+xml;base64,${new Buffer(Cursor).toString(
'base64'
)}`}
alt="icon"
/>
)}
</ListItemIcon>
</ListItemButton>

<ListItemButton selected={selected === "2"} onClick={() => setSelected("2")}>
<ListItemButton
selected={selected === '2'}
onClick={() => setSelected('2')}
>
<ListItemIcon>
{selected === "2" ? <img
src={`data:image/svg+xml;base64,${new Buffer(MoveActive).toString(
'base64'
)}`}
alt="move"
/> : <img
src={`data:image/svg+xml;base64,${new Buffer(Move).toString(
'base64'
)}`}
alt="move"
/>}

{selected === '2' ? (
<img
src={`data:image/svg+xml;base64,${new Buffer(
MoveActive
).toString('base64')}`}
alt="move"
/>
) : (
<img
src={`data:image/svg+xml;base64,${new Buffer(Move).toString(
'base64'
)}`}
alt="move"
/>
)}
</ListItemIcon>
</ListItemButton>
</List>
Expand All @@ -86,35 +99,49 @@ const Sidebar = () => {
</Box>

<List disablePadding component="nav">
<ListItemButton selected={selected === "3"} onClick={() => setSelected("3")}>
<ListItemButton
selected={selected === '3'}
onClick={() => setSelected('3')}
>
<ListItemIcon>
{selected === "3" ? <img
src={`data:image/svg+xml;base64,${new Buffer(IconActive).toString(
'base64'
)}`}
alt="icon"
/> : <img
src={`data:image/svg+xml;base64,${new Buffer(Icon).toString(
'base64'
)}`}
alt="icon"
/>}
{selected === '3' ? (
<img
src={`data:image/svg+xml;base64,${new Buffer(
IconActive
).toString('base64')}`}
alt="icon"
/>
) : (
<img
src={`data:image/svg+xml;base64,${new Buffer(Icon).toString(
'base64'
)}`}
alt="icon"
/>
)}
</ListItemIcon>
</ListItemButton>

<ListItemButton selected={selected === "4"} onClick={() => setSelected("4")}>
<ListItemButton
selected={selected === '4'}
onClick={() => setSelected('4')}
>
<ListItemIcon>
{selected === "4" ? <img
src={`data:image/svg+xml;base64,${new Buffer(FullscreenActive).toString(
'base64'
)}`}
alt="fullscreen"
/> : <img
src={`data:image/svg+xml;base64,${new Buffer(Fullscreen).toString(
'base64'
)}`}
alt="fullscreen"
/>}
{selected === '4' ? (
<img
src={`data:image/svg+xml;base64,${new Buffer(
FullscreenActive
).toString('base64')}`}
alt="fullscreen"
/>
) : (
<img
src={`data:image/svg+xml;base64,${new Buffer(
Fullscreen
).toString('base64')}`}
alt="fullscreen"
/>
)}
</ListItemIcon>
</ListItemButton>
</List>
Expand Down
2 changes: 1 addition & 1 deletion src/components/assets/styles/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const vars = {
nodeBorderColor: '#18A0FB',
nodePointerBg: '#fff',
nodeButtonTextColor: 'rgba(255, 255, 255, 0.8)',
nodeButtonLineColor: 'rgba(255, 255, 255, 0.2)'
nodeButtonLineColor: 'rgba(255, 255, 255, 0.2)',
};

export default vars;

0 comments on commit be962bb

Please sign in to comment.