Fix settings popover toggle logic

This commit is contained in:
yangdx
2025-03-20 04:44:16 +08:00
parent 2b06cee7fe
commit b422d223e8

View File

@@ -199,17 +199,15 @@ export default function Settings() {
const { t } = useTranslation();
const saveSettings = () => setOpened(false);
const toggleSettings = () => setOpened(!opened);
return (
<>
<Popover open={opened}>
<Popover open={opened} onOpenChange={setOpened}>
<PopoverTrigger asChild>
<Button
variant={controlButtonVariant}
tooltip={t('graphPanel.sideBar.settings.settings')}
size="icon"
onClick={toggleSettings}
>
<SettingsIcon />
</Button>