Skip to content

Commit a2d42d1

Browse files
committed
pass props into rerender()
1 parent 5c1fd2f commit a2d42d1

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

static/app/views/replays/detail/ai/useReplaySummary.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ describe('useReplaySummary', () => {
243243
// Update the segment count and expect a POST.
244244
mockReplayRecord.count_segments = 2;
245245
mockReplay.getReplay = jest.fn().mockReturnValue(mockReplayRecord);
246-
rerender();
246+
rerender({replay: mockReplay});
247247

248248
await waitFor(() => {
249249
expect(mockPostRequest).toHaveBeenCalledWith(

static/app/views/replays/detail/ai/useReplaySummary.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,11 @@ function createAISummaryQueryKey(
7676
return [`/projects/${orgSlug}/${projectSlug}/replays/${replayId}/summarize/`];
7777
}
7878

79-
export function useReplaySummary({
80-
replay,
81-
options,
82-
}: {
79+
export function useReplaySummary(props: {
8380
replay: ReplayReader;
8481
options?: UseApiQueryOptions<SummaryResponse>;
8582
}): UseReplaySummaryResult {
83+
const {replay, options} = props;
8684
const organization = useOrganization();
8785
const replayRecord = replay.getReplay();
8886
const project = useProjectFromId({project_id: replayRecord?.project_id});

0 commit comments

Comments
 (0)