import styled from '@emotion/styled'; import {CodeSnippet} from 'sentry/components/codeSnippet'; import ExternalLink from 'sentry/components/links/externalLink'; import List from 'sentry/components/list'; import ListItem from 'sentry/components/list/listItem'; import LoadingError from 'sentry/components/loadingError'; import LoadingIndicator from 'sentry/components/loadingIndicator'; import {t, tct} from 'sentry/locale'; import {space} from 'sentry/styles/space'; import type {Project, ProjectKey} from 'sentry/types/project'; import {useApiQuery} from 'sentry/utils/queryClient'; import useOrganization from 'sentry/utils/useOrganization'; export function OtherPlatformsInfo({ projectSlug, platform, }: { platform: string; projectSlug: Project['slug']; }) { const organization = useOrganization(); const { data = [], isError, isLoading, refetch, } = useApiQuery([`/projects/${organization.slug}/${projectSlug}/keys/`], { staleTime: Infinity, }); if (isLoading) { return ; } if (isError) { return ; } return ( {t( "We cannot provide instructions for '%s' projects. However, please find below the DSN key for this project, which is required to instrument Sentry.", platform )} {t('dsn: %s', data[0].dsn.public)} {t( 'Since it can be a lot of work creating a Sentry SDK from scratch, we suggest you review the following SDKs which are applicable for a wide variety of applications:' )} Browser JavaScript Python Node.js .NET JAVA
{tct( "Also there's a rich ecosystem of [link:community suported SDKs] (including NestJS, Nuxt2, Perl, CFML and Clojure).", { link: ( ), } )}
{tct( 'Your favorite language or framework still cannot be found? Then we encourage you to consider [link:writing your own SDK].', { link: , } )}
); } const Wrapper = styled('div')` display: flex; flex-direction: column; gap: ${space(2)}; `; const Suggestion = styled(Wrapper)` gap: ${space(1)}; `;