Fix: React hooks error - moved skill selector ESC handler to main useInput
This commit is contained in:
@@ -2351,7 +2351,9 @@ const App = () => {
|
|||||||
|
|
||||||
// ESC closes menus
|
// ESC closes menus
|
||||||
if (key.escape) {
|
if (key.escape) {
|
||||||
if (showTodoOverlay) {
|
if (showSkillSelector) {
|
||||||
|
setShowSkillSelector(false);
|
||||||
|
} else if (showTodoOverlay) {
|
||||||
setShowTodoOverlay(false);
|
setShowTodoOverlay(false);
|
||||||
} else if (showCommandPalette) {
|
} else if (showCommandPalette) {
|
||||||
setShowCommandPalette(false);
|
setShowCommandPalette(false);
|
||||||
@@ -4176,12 +4178,7 @@ This gives the user a chance to refine requirements before implementation.
|
|||||||
}]);
|
}]);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handle ESC to close
|
// ESC handling is done in the main keyboard handler
|
||||||
useInput((input, key) => {
|
|
||||||
if (key.escape) {
|
|
||||||
setShowSkillSelector(false);
|
|
||||||
}
|
|
||||||
}, { isActive: showSkillSelector });
|
|
||||||
|
|
||||||
return h(Box, {
|
return h(Box, {
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
|
|||||||
Reference in New Issue
Block a user