debug session history participat letancy
This commit is contained in:
parent
c42dfdbb30
commit
b9eff8dac0
|
|
@ -17,6 +17,10 @@ const JKUserLatency = ({user, showAll, showBadgeOnly}) => {
|
|||
);
|
||||
};
|
||||
|
||||
JKUserLatency.propTypes = { user: PropTypes.object.isRequired };
|
||||
JKUserLatency.propTypes = {
|
||||
user: PropTypes.object.isRequired,
|
||||
showAll: PropTypes.bool,
|
||||
showBadgeOnly: PropTypes.bool
|
||||
};
|
||||
|
||||
export default JKUserLatency;
|
||||
|
|
|
|||
|
|
@ -45,11 +45,12 @@ const JKSessionsHistoryItem = ({ session_id, sessionGroup }) => {
|
|||
|
||||
|
||||
useEffect(() => {
|
||||
console.log('participants', participants);
|
||||
|
||||
if (participants.length > 0 && currentUser) {
|
||||
const currentUserId = currentUser.id;
|
||||
const otherUserIds = participants.filter(p => p.id !== currentUserId).map(p => p.id);
|
||||
fetchUserLatencies({ otherUserIds, currentUserId });
|
||||
console.log('X_DEBUG_ JKSessionsHistoryItem', currentUserId, otherUserIds);
|
||||
fetchUserLatencies({ currentUserId, otherUserIds});
|
||||
}
|
||||
}, [participants]);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ export const fetchUserLatencies = createAsyncThunk(
|
|||
'latency/fetchUserLatencies',
|
||||
async (options, thunkAPI) => {
|
||||
const { currentUserId, otherUserIds } = options
|
||||
console.log('X_DEBUG_ fetchUserLatencies', currentUserId, otherUserIds)
|
||||
const response = await getLatencyToUsers(currentUserId, otherUserIds)
|
||||
return response.json()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue