import EmptyStateWarning from 'sentry/components/emptyStateWarning'; import ErrorBoundary from 'sentry/components/errorBoundary'; import * as Layout from 'sentry/components/layouts/thirds'; import LoadingIndicator from 'sentry/components/loadingIndicator'; import Pagination from 'sentry/components/pagination'; import Panel from 'sentry/components/panels/panel'; import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle'; import {t} from 'sentry/locale'; import {space} from 'sentry/styles/space'; import type {Activity} from 'sentry/types'; import {useApiQuery} from 'sentry/utils/queryClient'; import routeTitle from 'sentry/utils/routeTitle'; import useOrganization from 'sentry/utils/useOrganization'; import ActivityFeedItem from './activityFeedItem'; function OrganizationActivity() { const organization = useOrganization(); const { data: activity, isLoading, isError, getResponseHeader, } = useApiQuery([`/organizations/${organization.slug}/activity/`], { staleTime: 0, }); if (isLoading) { return ; } if (isError || (!isLoading && !activity.length)) { return (

{t('Nothing to show here, move along.')}

); } const activityPageLinks = getResponseHeader?.('Link'); return ( {t('Activity')} {!isLoading && (
{activity.map(item => ( ))}
)}
{activityPageLinks && }
); } export default OrganizationActivity;