-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(replay): Show Seen-by list of users on Replay Details (#68760)
<img width="450" alt="SCR-20240411-nzaf" src="https://github.com/getsentry/sentry/assets/187460/413b7be7-0e2e-44f3-905e-ba2c0c0d013a"> Avatar list is kinda weird, it sticks out to the left: <img width="488" alt="SCR-20240411-nzka" src="https://github.com/getsentry/sentry/assets/187460/71fe5267-e5a3-4fb3-b86f-2e6b7a98ebc1"> Relates to getsentry/team-replay#19 Relates to #64924 Depends on #68990
- Loading branch information
Showing
2 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import type {User} from 'sentry/types'; | ||
import {useApiQuery, type UseApiQueryOptions} from 'sentry/utils/queryClient'; | ||
import useOrganization from 'sentry/utils/useOrganization'; | ||
|
||
interface Props { | ||
projectSlug: undefined | string; | ||
replayId: undefined | string; | ||
} | ||
|
||
type TResponseData = { | ||
data: { | ||
viewed_by: User[]; | ||
}; | ||
}; | ||
|
||
export default function useReplayViewedByData( | ||
{projectSlug, replayId}: Props, | ||
options: Partial<UseApiQueryOptions<TResponseData>> = {} | ||
) { | ||
const organization = useOrganization(); | ||
return useApiQuery<TResponseData>( | ||
[`/projects/${organization.slug}/${projectSlug}/replays/${replayId}/viewed-by/`], | ||
{ | ||
enabled: Boolean(projectSlug && replayId), | ||
staleTime: Infinity, | ||
retry: false, | ||
...options, | ||
} | ||
); | ||
} |