refactor: css cleanup

This commit is contained in:
David Ralph
2021-09-05 14:19:19 +01:00
parent 7f71321e67
commit 5baf067ff1
25 changed files with 636 additions and 680 deletions

View File

@@ -1,8 +1,8 @@
export default function KeybindInput(props) {
const language = window.language.modals.main.settings;
const value = props.state[props.settingsName];
const getButton = () => {
const value = props.state[props.settingsName];
if (!value) {
return null;
} else if (value === language.sections.keybinds.recording) {
@@ -15,7 +15,7 @@ export default function KeybindInput(props) {
return (
<>
<p>{props.name}</p>
<input type='text' onClick={() => props.set(props.settingsName)} value={props.state[props.settingsName] || language.sections.keybinds.click_to_record} readOnly/>
<input type='text' onClick={() => props.set(props.settingsName)} value={value || language.sections.keybinds.click_to_record} readOnly/>
{getButton()}
</>
);