mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 12:21:02 +01:00
Fix session recording navigation from persons page (#5404)
* fix close recording player from persons * set proper tab when watching a recording
This commit is contained in:
parent
796fa106fe
commit
0a46442b3d
@ -201,10 +201,13 @@ export const personsLogic = kea<personsLogicType<PersonPaginatedResponse>>({
|
||||
actions.loadPersons()
|
||||
}
|
||||
},
|
||||
'/person/*': ({ _: person }, _searchParams, { activeTab }) => {
|
||||
if (activeTab && values.activeTab !== activeTab) {
|
||||
'/person/*': ({ _: person }, { sessionRecordingId }, { activeTab }) => {
|
||||
if (sessionRecordingId) {
|
||||
actions.navigateToTab(PersonsTabType.SESSIONS)
|
||||
} else if (activeTab && values.activeTab !== activeTab) {
|
||||
actions.navigateToTab(activeTab as PersonsTabType)
|
||||
}
|
||||
|
||||
if (person) {
|
||||
actions.loadPerson(person) // underscore contains the wildcard
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ export const sessionsTableLogic = kea<sessionsTableLogicType<SessionRecordingId>
|
||||
properties,
|
||||
selectedDate,
|
||||
}),
|
||||
setSessionRecordingId: (sessionRecordingId: SessionRecordingId) => ({ sessionRecordingId }),
|
||||
setSessionRecordingId: (sessionRecordingId: SessionRecordingId | null) => ({ sessionRecordingId }),
|
||||
closeSessionPlayer: true,
|
||||
loadSessionEvents: (session: SessionType) => ({ session }),
|
||||
addSessionEvents: (session: SessionType, events: EventType[]) => ({ session, events }),
|
||||
@ -290,8 +290,8 @@ export const sessionsTableLogic = kea<sessionsTableLogicType<SessionRecordingId>
|
||||
actions.loadSessions(true)
|
||||
}
|
||||
|
||||
if (params.sessionRecordingId && params.sessionRecordingId !== values.sessionRecordingId) {
|
||||
actions.setSessionRecordingId(params.sessionRecordingId)
|
||||
if (params.sessionRecordingId !== values.sessionRecordingId) {
|
||||
actions.setSessionRecordingId(params.sessionRecordingId ?? null)
|
||||
}
|
||||
|
||||
if (JSON.stringify(params.filters || {}) !== JSON.stringify(values.filters)) {
|
||||
|
Loading…
Reference in New Issue
Block a user