()
| 9 | return "production" === 'development' || "external" === 'ant'; |
| 10 | } |
| 11 | export function DevBar() { |
| 12 | const $ = _c(5); |
| 13 | const [slowOps, setSlowOps] = useState(getSlowOperations); |
| 14 | let t0; |
| 15 | if ($[0] === Symbol.for("react.memo_cache_sentinel")) { |
| 16 | t0 = () => { |
| 17 | setSlowOps(getSlowOperations()); |
| 18 | }; |
| 19 | $[0] = t0; |
| 20 | } else { |
| 21 | t0 = $[0]; |
| 22 | } |
| 23 | useInterval(t0, shouldShowDevBar() ? 500 : null); |
| 24 | if (!shouldShowDevBar() || slowOps.length === 0) { |
| 25 | return null; |
| 26 | } |
| 27 | let t1; |
| 28 | if ($[1] !== slowOps) { |
| 29 | t1 = slowOps.slice(-3).map(_temp).join(" \xB7 "); |
| 30 | $[1] = slowOps; |
| 31 | $[2] = t1; |
| 32 | } else { |
| 33 | t1 = $[2]; |
| 34 | } |
| 35 | const recentOps = t1; |
| 36 | let t2; |
| 37 | if ($[3] !== recentOps) { |
| 38 | t2 = <Text wrap="truncate-end" color="warning">[ANT-ONLY] slow sync: {recentOps}</Text>; |
| 39 | $[3] = recentOps; |
| 40 | $[4] = t2; |
| 41 | } else { |
| 42 | t2 = $[4]; |
| 43 | } |
| 44 | return t2; |
| 45 | } |
| 46 | function _temp(op) { |
| 47 | return `${op.operation} (${Math.round(op.durationMs)}ms)`; |
| 48 | } |
nothing calls this directly
no test coverage detected