import {RouteComponentProps} from 'react-router'; import {Alert} from 'sentry/components/alert'; import useFetchFeedbackItem from 'sentry/components/feedback/useFetchFeedbackItem'; import * as Layout from 'sentry/components/layouts/thirds'; import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container'; import {PageHeadingQuestionTooltip} from 'sentry/components/pageHeadingQuestionTooltip'; import Placeholder from 'sentry/components/placeholder'; import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle'; import {t} from 'sentry/locale'; import useOrganization from 'sentry/utils/useOrganization'; import useProjectFromSlug from 'sentry/utils/useProjectFromSlug'; interface RouteParams { feedbackSlug: string; } interface Props extends RouteComponentProps {} export default function FeedbackDetailsPage({params: {feedbackSlug}}: Props) { const organization = useOrganization(); const [projectSlug, feedbackId] = feedbackSlug.split(':'); const project = useProjectFromSlug({organization, projectSlug}); const {isLoading, isError, data} = useFetchFeedbackItem( {feedbackId, organization, project: project!}, {enabled: Boolean(project)} ); return ( {t('Feedback v2')} {isLoading ? ( ) : isError ? ( {t('An error occurred')} ) : (
{JSON.stringify(data, null, '\t')}
)}
); }