fix(ui): fix logging
This commit is contained in:
parent
00460d6a43
commit
b68908b279
2 changed files with 2 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ function ModuleCard(props: Props) {
|
|||
<p className='flex-grow'>{module.description}</p>
|
||||
</div>
|
||||
<div className='flex items-end'>
|
||||
<Switch size='small' checked={!module.isEnabled} title={module.isEnabled ? 'A' : 'B'}
|
||||
<Switch size='small' checked={!module.isEnabled} title={module.isEnabled ? 'Enabled' : 'Disabled'}
|
||||
onChange={() => props.onToggle(module)} />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ function Modules(props: Props) {
|
|||
toast.success(`Module ${module.label} ${!isEnabled ? 'enabled' : 'disabled'}`);
|
||||
props.updateModule(module.key);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
toast.error(`Failed to ${module.isEnabled ? 'disable' : 'enable'} module ${module.label}`);
|
||||
module.isEnabled = !module.isEnabled;
|
||||
setModulesState([...modulesState]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue