Fix hooks to avoid unnecessary re-renders (#10820)

This commit is contained in:
Tommaso Sciortino
2025-10-09 11:07:25 -07:00
committed by GitHub
parent b60c8858af
commit cd354aebed
3 changed files with 37 additions and 20 deletions
+7 -1
View File
@@ -1239,6 +1239,11 @@ Logging in with Google... Please restart Gemini CLI to continue.
],
);
const exitPrivacyNotice = useCallback(
() => setShowPrivacyNotice(false),
[setShowPrivacyNotice],
);
const uiActions: UIActions = useMemo(
() => ({
handleThemeSelect,
@@ -1248,7 +1253,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
onAuthError,
handleEditorSelect,
exitEditorDialog,
exitPrivacyNotice: () => setShowPrivacyNotice(false),
exitPrivacyNotice,
closeSettingsDialog,
closeModelDialog,
closePermissionsDialog,
@@ -1273,6 +1278,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
onAuthError,
handleEditorSelect,
exitEditorDialog,
exitPrivacyNotice,
closeSettingsDialog,
closeModelDialog,
closePermissionsDialog,