fix(peek): decode timestamp param properly (#12796)
This commit is contained in:
@@ -11,9 +11,14 @@ export const PeekViewObservationDetail = ({
|
||||
}) => {
|
||||
const router = useRouter();
|
||||
const peekId = router.query.peek as string | undefined;
|
||||
const timestamp = router.query.timestamp
|
||||
? new Date(router.query.timestamp as string)
|
||||
const timestampParam = router.query.timestamp as string | undefined;
|
||||
|
||||
// Decode the timestamp parameter before parsing as Date
|
||||
// This handles cases where the timestamp might be URL-encoded
|
||||
const timestamp = timestampParam
|
||||
? new Date(decodeURIComponent(timestampParam))
|
||||
: undefined;
|
||||
|
||||
const traceId = router.query.traceId as string | undefined;
|
||||
|
||||
const trace = usePeekData({
|
||||
|
||||
Reference in New Issue
Block a user