| 1 | import { |
| 2 | FrontendDiagnosticsControl, |
| 3 | type FrontendDiagnosticsControlProps, |
| 4 | } from "./FrontendDiagnosticsControl"; |
| 5 | import { isFrontendDiagnosticsBuild } from "../lib/frontendDiagnostics"; |
| 6 | import "./ScrollDiagnosticPanel.css"; |
| 7 | |
| 8 | const diagnosticsAvailable = isFrontendDiagnosticsBuild( |
| 9 | typeof __BUILD_CHANNEL__ === "string" ? __BUILD_CHANNEL__ : "stable", |
| 10 | Boolean(import.meta.env?.DEV), |
| 11 | ); |
| 12 | |
| 13 | export { FrontendDiagnosticsControl }; |
| 14 | export type { FrontendDiagnosticsControlProps }; |
| 15 | |
| 16 | export default function FrontendDiagnosticsPanel(props: FrontendDiagnosticsControlProps) { |
| 17 | if (!diagnosticsAvailable) return null; |
| 18 | return <FrontendDiagnosticsControl {...props} />; |
| 19 | } |
| 20 |