remove use memo from settings (#869)

main
Michael Fix 5 years ago committed by GitHub
parent cc5c2ab94a
commit 68d8b3f2d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,8 +24,7 @@ function KeyboardShortcut({ handle }) {
return null
}
const WindowSettings = React.memo(
({
function WindowSettings({
onChange,
windowTheme,
paddingHorizontal,
@ -40,13 +39,10 @@ const WindowSettings = React.memo(
watermark,
onWidthChanging,
onWidthChanged
}) => {
}) {
return (
<div className="settings-content">
<ThemeSelect
selected={windowTheme || 'none'}
onChange={onChange.bind(null, 'windowTheme')}
/>
<ThemeSelect selected={windowTheme || 'none'} onChange={onChange.bind(null, 'windowTheme')} />
<div className="row">
<Slider
label="Padding (vert)"
@ -131,11 +127,17 @@ const WindowSettings = React.memo(
</style>
</div>
)
}
)
}
const TypeSettings = React.memo(
({ onChange, onUpload, font, size, lineHeight, onWidthChanging, onWidthChanged }) => {
function TypeSettings({
onChange,
onUpload,
font,
size,
lineHeight,
onWidthChanging,
onWidthChanged
}) {
return (
<div className="settings-content">
<FontSelect
@ -163,12 +165,11 @@ const TypeSettings = React.memo(
/>
</div>
)
}
)
}
const resetButtonStyle = { borderTop: `1px solid ${COLORS.SECONDARY}` }
const MiscSettings = React.memo(({ format, reset, applyPreset, settings }) => {
function MiscSettings({ format, reset, applyPreset, settings }) {
const input = React.useRef(null)
let download
try {
@ -226,7 +227,7 @@ const MiscSettings = React.memo(({ format, reset, applyPreset, settings }) => {
</style>
</div>
)
})
}
const settingButtonStyle = {
width: '40px',

Loading…
Cancel
Save