Revert "fix: add fallback for useModuleId hook in query panel"

This reverts commit 27ba7dec30.
This commit is contained in:
Kavin Venkatachalam 2025-07-03 17:47:41 +05:30
parent d9b6efefad
commit edf657b659
2 changed files with 2 additions and 9 deletions

View file

@ -267,4 +267,4 @@
"jsx"
]
}
}
}

View file

@ -7,14 +7,7 @@ export const useQueryPanelKeyHooks = (onChange, value, type) => {
const queryPanelHeight = useStore((state) => state.queryPanel.queryPanelHeight);
const runQueryOnShortcut = useStore((state) => state.queryPanel.runQueryOnShortcut);
const previewQueryOnShortcut = useStore((state) => state.queryPanel.previewQueryOnShortcut);
// Handle case where ModuleContext is not available
let moduleId;
try {
moduleId = useModuleId();
} catch (error) {
moduleId = 'canvas'; // Default fallback
}
const moduleId = useModuleId();
const location = useLocation();
const { pathname } = location;