diff --git a/src/renderer/components/+preferences/application.tsx b/src/renderer/components/+preferences/application.tsx index 25a80d1da5..affce2e44b 100644 --- a/src/renderer/components/+preferences/application.tsx +++ b/src/renderer/components/+preferences/application.tsx @@ -135,7 +135,9 @@ export const Application = observer(() => {
- Automatically start Lens on login + userStore.openAtLogin = v.target.checked}> + Automatically start Lens on login + {/* , HTMLInputElement> { onClick?: () => void; } -export function Switch({ children, ...settings }: Props) { +export function Switch({ children, onClick, ...settings }: Props) { const id = `switch-${Date.now()}`; - const onClick = () => { - if (settings.disabled) { + const onLabelClick = () => { + if (settings.disabled || !onClick) { return; } - settings.onClick?.(); + onClick(); }; return ( -