Skip to content

Commit

Permalink
fix(insights): Don't reset new insight when recording opened 2.0 (#21449
Browse files Browse the repository at this point in the history
)

fix(insights): Don't reset new insight when recording opened
  • Loading branch information
Twixes authored Apr 16, 2024
1 parent 8859faf commit 7276e4d
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ export const sessionPlayerModalLogic = kea<sessionPlayerModalLogicType>([
],
}),
actionToUrl(({ values }) => {
const buildURL = (
replace: boolean
): [
const buildURL = (): [
string,
Record<string, any>,
Record<string, any>,
Expand All @@ -71,12 +69,12 @@ export const sessionPlayerModalLogic = kea<sessionPlayerModalLogicType>([
searchParams.timestamp = values.initialTimestamp
}

return [router.values.location.pathname, searchParams, hashParams, { replace }]
return [router.values.location.pathname, searchParams, hashParams, { replace: true }]
}

return {
openSessionPlayer: () => buildURL(false),
closeSessionPlayer: () => buildURL(false),
openSessionPlayer: () => buildURL(),
closeSessionPlayer: () => buildURL(),
}
}),
urlToAction(({ actions, values }) => {
Expand Down

0 comments on commit 7276e4d

Please sign in to comment.