Skip to content

Commit

Permalink
feat: corrected the handling of relativeTime as null in alertHistory …
Browse files Browse the repository at this point in the history
…page (#6392)
  • Loading branch information
SagarRajput-7 authored Nov 6, 2024
1 parent 64d46bc commit 8403a33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/pages/AlertDetails/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ export const useAlertHistoryQueryParams = (): {

const startTime = params.get(QueryParams.startTime);
const endTime = params.get(QueryParams.endTime);
const relativeTimeParam = params.get(QueryParams.relativeTime);

const relativeTime =
params.get(QueryParams.relativeTime) ?? RelativeTimeMap['6hr'];
(relativeTimeParam === 'null' ? null : relativeTimeParam) ??
RelativeTimeMap['6hr'];

const intStartTime = parseInt(startTime || '0', 10);
const intEndTime = parseInt(endTime || '0', 10);
Expand Down

0 comments on commit 8403a33

Please sign in to comment.