fix(ui): refactor sessionitem
This commit is contained in:
parent
19178807f8
commit
e7a31dbb8c
1 changed files with 26 additions and 25 deletions
|
|
@ -46,13 +46,13 @@ interface Props {
|
|||
userSessionsCount: number
|
||||
issueTypes: [];
|
||||
active: boolean;
|
||||
onUserClick: (userId: string, userAnonymousId: string) => null;
|
||||
hasUserFilter: boolean;
|
||||
disableUser: boolean;
|
||||
metaList: Array<any>;
|
||||
showActive: boolean;
|
||||
lastPlayedSessionId: string;
|
||||
},
|
||||
onUserClick: (userId: string, userAnonymousId: string) => null;
|
||||
hasUserFilter: boolean;
|
||||
disableUser: boolean;
|
||||
metaList: Array<any>;
|
||||
showActive: boolean;
|
||||
lastPlayedSessionId: string;
|
||||
}
|
||||
|
||||
function SessionItem(props: Props) {
|
||||
|
|
@ -60,25 +60,7 @@ function SessionItem(props: Props) {
|
|||
const { timezone } = settingsStore.sessionSettings;
|
||||
|
||||
const {
|
||||
session: {
|
||||
sessionId,
|
||||
userBrowser,
|
||||
userOs,
|
||||
userId,
|
||||
userAnonymousId,
|
||||
userDisplayName,
|
||||
userCountry,
|
||||
startedAt,
|
||||
duration,
|
||||
eventsCount,
|
||||
viewed,
|
||||
userDeviceType,
|
||||
userNumericHash,
|
||||
live,
|
||||
metadata,
|
||||
issueTypes,
|
||||
active,
|
||||
},
|
||||
session,
|
||||
onUserClick = () => null,
|
||||
hasUserFilter = false,
|
||||
disableUser = false,
|
||||
|
|
@ -87,6 +69,25 @@ function SessionItem(props: Props) {
|
|||
lastPlayedSessionId,
|
||||
} = props;
|
||||
|
||||
const {
|
||||
sessionId,
|
||||
userBrowser,
|
||||
userOs,
|
||||
userId,
|
||||
userAnonymousId,
|
||||
userDisplayName,
|
||||
userCountry,
|
||||
startedAt,
|
||||
duration,
|
||||
eventsCount,
|
||||
viewed,
|
||||
userDeviceType,
|
||||
userNumericHash,
|
||||
live,
|
||||
metadata,
|
||||
issueTypes,
|
||||
active,
|
||||
} = session;
|
||||
const location = useLocation();
|
||||
|
||||
console.log(location.pathname);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue