Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(issues): Remove child props from attachments page #80776

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions static/app/views/issueDetails/groupEventAttachments/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,36 @@ import styled from '@emotion/styled';
import Feature from 'sentry/components/acl/feature';
import FeatureDisabled from 'sentry/components/acl/featureDisabled';
import * as Layout from 'sentry/components/layouts/thirds';
import LoadingError from 'sentry/components/loadingError';
import LoadingIndicator from 'sentry/components/loadingIndicator';
import {t} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import type {Group} from 'sentry/types/group';
import type {RouteComponentProps} from 'sentry/types/legacyReactRouter';
import useOrganization from 'sentry/utils/useOrganization';
import {useParams} from 'sentry/utils/useParams';
import {useGroup} from 'sentry/views/issueDetails/useGroup';
import {useHasStreamlinedUI} from 'sentry/views/issueDetails/utils';

import GroupEventAttachments from './groupEventAttachments';

type Props = RouteComponentProps<{groupId: string}, {}> & {
group: Group;
};

function GroupEventAttachmentsContainer({group}: Props) {
function GroupEventAttachmentsContainer() {
const organization = useOrganization();
const hasStreamlinedUI = useHasStreamlinedUI();
const params = useParams();

const {
data: group,
isPending: isGroupPending,
isError: isGroupError,
refetch: refetchGroup,
} = useGroup({groupId: params.groupId});

if (isGroupPending) {
return <LoadingIndicator />;
}

if (isGroupError) {
return <LoadingError onRetry={refetchGroup} />;
}

return (
<Feature
Expand Down
Loading