details.tsx 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import {Alert} from 'sentry/components/alert';
  2. import useFetchFeedbackItem from 'sentry/components/feedback/useFetchFeedbackItem';
  3. import * as Layout from 'sentry/components/layouts/thirds';
  4. import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
  5. import {PageHeadingQuestionTooltip} from 'sentry/components/pageHeadingQuestionTooltip';
  6. import Placeholder from 'sentry/components/placeholder';
  7. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  8. import {t} from 'sentry/locale';
  9. import useOrganization from 'sentry/utils/useOrganization';
  10. export default function Details() {
  11. const organization = useOrganization();
  12. const {isLoading, isError, data} = useFetchFeedbackItem({}, {});
  13. return (
  14. <SentryDocumentTitle title={`Feedback v2 — ${organization.slug}`}>
  15. <Layout.Header>
  16. <Layout.HeaderContent>
  17. <Layout.Title>
  18. {t('Feedback v2')}
  19. <PageHeadingQuestionTooltip
  20. title={t(
  21. 'Feedback submitted by users who experienced an error while using your application, including their name, email address, and any additional comments.'
  22. )}
  23. docsUrl="https://docs.sentry.io/product/user-feedback/"
  24. />
  25. </Layout.Title>
  26. </Layout.HeaderContent>
  27. </Layout.Header>
  28. <PageFiltersContainer>
  29. <Layout.Body>
  30. <Layout.Main fullWidth>
  31. {isLoading ? (
  32. <Placeholder />
  33. ) : isError ? (
  34. <Alert type="error" showIcon>
  35. {t('An error occurred')}
  36. </Alert>
  37. ) : (
  38. <pre>{JSON.stringify(data, null, '\t')}</pre>
  39. )}
  40. </Layout.Main>
  41. </Layout.Body>
  42. </PageFiltersContainer>
  43. </SentryDocumentTitle>
  44. );
  45. }