mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-16 17:25:58 +00:00
add support for react dev tools in the cosmos explorer (#1788)
This commit is contained in:
parent
3c5d899e47
commit
f533eeb0fc
@ -1,3 +1,6 @@
|
||||
// Import this first, to ensure that the dev tools hook is copied before React is loaded.
|
||||
import "./ReactDevTools";
|
||||
|
||||
// CSS Dependencies
|
||||
import { initializeIcons, loadTheme } from "@fluentui/react";
|
||||
import { QuickstartCarousel } from "Explorer/Quickstart/QuickstartCarousel";
|
||||
|
@ -1,3 +1,7 @@
|
||||
if (window.parent !== window) {
|
||||
(window as any).__REACT_DEVTOOLS_GLOBAL_HOOK__ = (window.parent as any).__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
try {
|
||||
(window as any).__REACT_DEVTOOLS_GLOBAL_HOOK__ = (window.parent as any).__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
} catch {
|
||||
// No-op. We can throw here if the parent is not the same origin (such as in the Azure portal).
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user