toogle besser

This commit is contained in:
JM 2026-05-06 11:39:12 +02:00
parent e9ac53fe73
commit 6cdd340e50
1 changed files with 13 additions and 10 deletions

View File

@ -44,16 +44,19 @@ class TeamsSettingsBlock extends Component {
); );
} }
prefSwitch(user, prefs, key, label) { prefSwitch(user, prefs, key, label) {
return ( return (
<Switch <Switch
state={!!prefs[key]} state={!!prefs[key]}
onchange={(value) => user.savePreferences({ [key]: value })} onchange={(value) =>
user.savePreferences({
[key]: value,
})
}
> >
{label} {label}
</Switch> </Switch>
); );
}
} }
export default function addTeamsSettings() { export default function addTeamsSettings() {