import { useState } from 'react'; import { Box, Stack, Tab, TabContent, TabsBar } from '@grafana/ui'; import { t } from 'app/core/internationalization'; import { AlertingPageWrapper } from '../components/AlertingPageWrapper'; import { isLocalDevEnv } from '../utils/misc'; import { withPageErrorBoundary } from '../withPageErrorBoundary'; import GettingStarted, { WelcomeHeader } from './GettingStarted'; import { getInsightsScenes, insightsIsAvailable } from './Insights'; import { PluginIntegrations } from './PluginIntegrations'; function Home() { const insightsEnabled = insightsIsAvailable() || isLocalDevEnv(); const [activeTab, setActiveTab] = useState<'insights' | 'overview'>(insightsEnabled ? 'insights' : 'overview'); const insightsScene = getInsightsScenes(); return ( {insightsEnabled && ( setActiveTab('insights')} /> )} setActiveTab('overview')} /> {activeTab === 'insights' && } {activeTab === 'overview' && } ); } export default withPageErrorBoundary(Home);