Skip to content

Commit

Permalink
fix: remove unused inports
Browse files Browse the repository at this point in the history
  • Loading branch information
lightlii committed Aug 22, 2023
1 parent 0666a81 commit 610e745
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Typography, makeStyles, useTheme } from '@material-ui/core'
import { Typography, makeStyles, useTheme } from '@material-ui/core'
import React from 'react'
import ReactMapboxGl from 'react-mapbox-gl'

Expand Down
24 changes: 16 additions & 8 deletions src/renderer/components/SettingsView/SettingsItem.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect } from 'react'
import React from 'react'

import { Typography, useTheme } from '@material-ui/core'
import ChevronRightIcon from '@material-ui/icons/ChevronRight'
Expand All @@ -8,7 +8,7 @@ import styled from 'styled-components'

const m = defineMessages({
on: 'On',
off: 'Off',
off: 'Off'
})

export const SettingsItem = React.forwardRef(
Expand All @@ -18,15 +18,17 @@ export const SettingsItem = React.forwardRef(

return (
<WrapperRow ref={ref} onClick={onClick} {...rest}>
<IconContainer>{Icon ? <Icon style={{ color: theme.palette.grey['600'] }} /> : null}</IconContainer>
<IconContainer>
{Icon ? <Icon style={{ color: theme.palette.grey['600'] }} /> : null}
</IconContainer>
<TitleContainer>
<Typography
variant='body1'
component='label'
style={{
textTransform: 'none',
textAlign: 'left',
cursor: 'pointer',
cursor: 'pointer'
}}
>
{typeof label === 'string' ? label : t(label)}
Expand All @@ -38,16 +40,22 @@ export const SettingsItem = React.forwardRef(
textTransform: 'none',
textAlign: 'left',
cursor: 'pointer',
color: theme.palette.grey['700'],
color: theme.palette.grey['700']
}}
>
{type === 'toggle' ? <ToggleSubtitle on={active} /> : <Subtitle label={subtitle} />}
{type === 'toggle' ? (
<ToggleSubtitle on={active} />
) : (
<Subtitle label={subtitle} />
)}
</Typography>
</TitleContainer>
{type === 'menuItem' && <ChevronRightIcon style={{ opacity: active ? 1 : 0 }} />}
{type === 'menuItem' && (
<ChevronRightIcon style={{ opacity: active ? 1 : 0 }} />
)}
</WrapperRow>
)
},
}
)

const Subtitle = ({ label }) => {
Expand Down
7 changes: 0 additions & 7 deletions src/renderer/components/SettingsView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,3 @@ const Container = styled.div`
display: flex;
height: 100%;
`

const Boc = styled.div`
background-color: red
height: 200px;
width:100px;
`

0 comments on commit 610e745

Please sign in to comment.