import {useEffect, useState} from 'react'; import styled from '@emotion/styled'; import {motion} from 'framer-motion'; import ExternalLink from 'sentry/components/links/externalLink'; import MultiPlatformPicker from 'sentry/components/multiPlatformPicker'; import {PlatformKey} from 'sentry/data/platformCategories'; import {t, tct} from 'sentry/locale'; import testableTransition from 'sentry/utils/testableTransition'; import useOrganization from 'sentry/utils/useOrganization'; import StepHeading from 'sentry/views/onboarding/components/stepHeading'; import CreateProjectsFooter from './components/createProjectsFooter'; import {StepProps} from './types'; import {usePersistedOnboardingState} from './utils'; function OnboardingPlatform(props: StepProps) { const organization = useOrganization(); const [selectedPlatforms, setSelectedPlatforms] = useState([]); const addPlatform = (platform: PlatformKey) => { setSelectedPlatforms([...selectedPlatforms, platform]); }; const removePlatform = (platform: PlatformKey) => { setSelectedPlatforms(selectedPlatforms.filter(p => p !== platform)); }; const [clientState] = usePersistedOnboardingState(); useEffect(() => { if (clientState) { setSelectedPlatforms(clientState.selectedPlatforms); } }, [clientState]); const clearPlatforms = () => setSelectedPlatforms([]); return ( {t('Select the platforms you want to monitor')}

{tct( `Variety is the spice of application monitoring. Identify what’s broken faster by selecting all the platforms that support your application. [link:View the full list].`, {link: } )}

); } export default OnboardingPlatform; const Wrapper = styled('div')` max-width: 850px; margin-left: auto; margin-right: auto; width: 100%; `;