| 1 |
import React from 'react' |
| 2 |
import { WithRestAPIContext } from '../../hooks/useRestAPI' |
| 3 |
import { ScreenMetaSlot } from '../common/ScreenMetaSlot' |
| 4 |
import { Toolbar } from '../common/Toolbar' |
| 5 |
import { InsightsDashboard } from './InsightsDashboard' |
| 6 |
|
| 7 |
export const InsightsMenu: React.FC = () => { |
| 8 |
const summary = window.CODE_SNIPPETS_INSIGHTS |
| 9 |
|
| 10 |
return ( |
| 11 |
<> |
| 12 |
<Toolbar /> |
| 13 |
|
| 14 |
<ScreenMetaSlot /> |
| 15 |
|
| 16 |
{summary && ( |
| 17 |
<div className="code-snippets-insights"> |
| 18 |
<WithRestAPIContext> |
| 19 |
<InsightsDashboard summary={summary} /> |
| 20 |
</WithRestAPIContext> |
| 21 |
</div>)} |
| 22 |
</> |
| 23 |
) |
| 24 |
} |
| 25 |
|