diff --git a/frontend/app/components/shared/SessionItem/Counter.tsx b/frontend/app/components/shared/SessionItem/Counter.tsx
index 5d9a82f9b..efbfb58bf 100644
--- a/frontend/app/components/shared/SessionItem/Counter.tsx
+++ b/frontend/app/components/shared/SessionItem/Counter.tsx
@@ -1,4 +1,4 @@
-import React from 'react'
+import React, { useState, useEffect } from 'react'
import { Duration } from 'luxon';
import { durationFormatted, formatTimeOrDate } from 'App/date';
@@ -7,9 +7,17 @@ interface Props {
}
function Counter({ startTime }: Props) {
+ const [count, setCount] = useState(0)
+
+ useEffect(() => {
+ setInterval(function() {
+ setCount(count + 1000)
+ }, 1000)
+ }, [])
+
return (
- {startTime && Duration.fromMillis(startTime).toFormat('m:ss')}
+ {startTime && Duration.fromMillis(startTime + count).toFormat('m:ss')}
)
}
diff --git a/frontend/app/duck/sessions.js b/frontend/app/duck/sessions.js
index 54bab17b2..0c63941e3 100644
--- a/frontend/app/duck/sessions.js
+++ b/frontend/app/duck/sessions.js
@@ -55,7 +55,7 @@ const reducer = (state = initialState, action = {}) => {
return state.set('errorStack', List(action.data.trace).map(ErrorStack)).set('sourcemapUploaded', action.data.sourcemapUploaded)
case FETCH_LIVE_LIST.SUCCESS:
// const { sessions, total } = action.data;
- const liveList = List(action.data).map(Session);
+ const liveList = List(action.data).map(s => new Session({...s, live: true}));
return state
.set('liveSessions', liveList)
case FETCH_LIST.SUCCESS:
diff --git a/frontend/app/player/singletone.js b/frontend/app/player/singletone.js
index de8be892f..93d33dfbd 100644
--- a/frontend/app/player/singletone.js
+++ b/frontend/app/player/singletone.js
@@ -79,4 +79,5 @@ export const Controls = {
toggleSpeed,
speedUp,
speedDown,
+ callPeer
}
diff --git a/frontend/app/types/session/session.js b/frontend/app/types/session/session.js
index 0db322332..3926c1901 100644
--- a/frontend/app/types/session/session.js
+++ b/frontend/app/types/session/session.js
@@ -28,7 +28,7 @@ export default Record({
siteId: '',
projectKey: '',
peerId: '',
- live: true,
+ live: false,
startedAt: 0,
duration: 0,
events: List(),
diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json
index f229f5cae..b55899b8d 100644
--- a/frontend/tsconfig.json
+++ b/frontend/tsconfig.json
@@ -22,6 +22,8 @@
"Duck/*": ["./app/duck/*"],
"Shared": ["./app/components/shared"],
"Shared/*": ["./app/components/shared/*"],
+ "Player": ["./app/player"],
+ "Player/*": ["./app/player/*"],
}
},
"exclude": [