|
@@ -12,8 +12,6 @@ import ReplayCount from 'sentry/components/group/issueReplayCount';
|
|
|
import ProjectBadge from 'sentry/components/idBadge/projectBadge';
|
|
|
import Link from 'sentry/components/links/link';
|
|
|
import Placeholder from 'sentry/components/placeholder';
|
|
|
-import ReplayCountContext from 'sentry/components/replays/replayCountContext';
|
|
|
-import useReplaysCount from 'sentry/components/replays/useReplaysCount';
|
|
|
import {IconChat} from 'sentry/icons';
|
|
|
import {tct} from 'sentry/locale';
|
|
|
import space from 'sentry/styles/space';
|
|
@@ -57,76 +55,68 @@ function EventOrGroupExtraDetails({
|
|
|
const showReplayCount =
|
|
|
organization.features.includes('session-replay-ui') && projectSupportsReplay(project);
|
|
|
|
|
|
- const counts = useReplaysCount({
|
|
|
- groupIds: id,
|
|
|
- organization,
|
|
|
- project,
|
|
|
- });
|
|
|
-
|
|
|
return (
|
|
|
- <ReplayCountContext.Provider value={counts}>
|
|
|
- <GroupExtra>
|
|
|
- {inbox && <InboxReason inbox={inbox} showDateAdded={showInboxTime} />}
|
|
|
- {shortId && (
|
|
|
- <InboxShortId
|
|
|
- shortId={shortId}
|
|
|
- avatar={
|
|
|
- project && (
|
|
|
- <ShadowlessProjectBadge project={project} avatarSize={12} hideName />
|
|
|
- )
|
|
|
+ <GroupExtra>
|
|
|
+ {inbox && <InboxReason inbox={inbox} showDateAdded={showInboxTime} />}
|
|
|
+ {shortId && (
|
|
|
+ <InboxShortId
|
|
|
+ shortId={shortId}
|
|
|
+ avatar={
|
|
|
+ project && (
|
|
|
+ <ShadowlessProjectBadge project={project} avatarSize={12} hideName />
|
|
|
+ )
|
|
|
+ }
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ {isUnhandled && <UnhandledTag />}
|
|
|
+ {!lifetime && !firstSeen && !lastSeen ? (
|
|
|
+ <Placeholder height="14px" width="100px" />
|
|
|
+ ) : (
|
|
|
+ <TimesTag
|
|
|
+ lastSeen={lifetime?.lastSeen || lastSeen}
|
|
|
+ firstSeen={lifetime?.firstSeen || firstSeen}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ {/* Always display comment count on inbox */}
|
|
|
+ {numComments > 0 && (
|
|
|
+ <CommentsLink to={`${issuesPath}${id}/activity/`} className="comments">
|
|
|
+ <IconChat
|
|
|
+ size="xs"
|
|
|
+ color={
|
|
|
+ subscriptionDetails?.reason === 'mentioned' ? 'successText' : undefined
|
|
|
}
|
|
|
/>
|
|
|
- )}
|
|
|
- {isUnhandled && <UnhandledTag />}
|
|
|
- {!lifetime && !firstSeen && !lastSeen ? (
|
|
|
- <Placeholder height="14px" width="100px" />
|
|
|
- ) : (
|
|
|
- <TimesTag
|
|
|
- lastSeen={lifetime?.lastSeen || lastSeen}
|
|
|
- firstSeen={lifetime?.firstSeen || firstSeen}
|
|
|
- />
|
|
|
- )}
|
|
|
- {/* Always display comment count on inbox */}
|
|
|
- {numComments > 0 && (
|
|
|
- <CommentsLink to={`${issuesPath}${id}/activity/`} className="comments">
|
|
|
- <IconChat
|
|
|
- size="xs"
|
|
|
- color={
|
|
|
- subscriptionDetails?.reason === 'mentioned' ? 'successText' : undefined
|
|
|
- }
|
|
|
- />
|
|
|
- <span>{numComments}</span>
|
|
|
- </CommentsLink>
|
|
|
- )}
|
|
|
- {showReplayCount && <ReplayCount groupId={id} />}
|
|
|
- {logger && (
|
|
|
- <LoggerAnnotation>
|
|
|
- <GlobalSelectionLink
|
|
|
- to={{
|
|
|
- pathname: issuesPath,
|
|
|
- query: {
|
|
|
- query: `logger:${logger}`,
|
|
|
- },
|
|
|
- }}
|
|
|
- >
|
|
|
- {logger}
|
|
|
- </GlobalSelectionLink>
|
|
|
- </LoggerAnnotation>
|
|
|
- )}
|
|
|
- {annotations?.map((annotation, key) => (
|
|
|
- <AnnotationNoMargin
|
|
|
- dangerouslySetInnerHTML={{
|
|
|
- __html: annotation,
|
|
|
+ <span>{numComments}</span>
|
|
|
+ </CommentsLink>
|
|
|
+ )}
|
|
|
+ {showReplayCount && <ReplayCount groupId={id} />}
|
|
|
+ {logger && (
|
|
|
+ <LoggerAnnotation>
|
|
|
+ <GlobalSelectionLink
|
|
|
+ to={{
|
|
|
+ pathname: issuesPath,
|
|
|
+ query: {
|
|
|
+ query: `logger:${logger}`,
|
|
|
+ },
|
|
|
}}
|
|
|
- key={key}
|
|
|
- />
|
|
|
- ))}
|
|
|
-
|
|
|
- {showAssignee && assignedTo && (
|
|
|
- <div>{tct('Assigned to [name]', {name: assignedTo.name})}</div>
|
|
|
- )}
|
|
|
- </GroupExtra>
|
|
|
- </ReplayCountContext.Provider>
|
|
|
+ >
|
|
|
+ {logger}
|
|
|
+ </GlobalSelectionLink>
|
|
|
+ </LoggerAnnotation>
|
|
|
+ )}
|
|
|
+ {annotations?.map((annotation, key) => (
|
|
|
+ <AnnotationNoMargin
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
+ __html: annotation,
|
|
|
+ }}
|
|
|
+ key={key}
|
|
|
+ />
|
|
|
+ ))}
|
|
|
+
|
|
|
+ {showAssignee && assignedTo && (
|
|
|
+ <div>{tct('Assigned to [name]', {name: assignedTo.name})}</div>
|
|
|
+ )}
|
|
|
+ </GroupExtra>
|
|
|
);
|
|
|
}
|
|
|
|