From 410ffb14754cc40b8a49e04cccb51901724c2480 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 11 Apr 2022 13:57:09 +0200 Subject: [PATCH] change(ui) - assist filter by userid --- .../Assist/components/SessionList/SessionList.tsx | 8 ++++++-- frontend/app/duck/sessions.js | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend/app/components/Assist/components/SessionList/SessionList.tsx b/frontend/app/components/Assist/components/SessionList/SessionList.tsx index 73c7a3a7f..32c267588 100644 --- a/frontend/app/components/Assist/components/SessionList/SessionList.tsx +++ b/frontend/app/components/Assist/components/SessionList/SessionList.tsx @@ -8,11 +8,15 @@ interface Props { loading: boolean, list: any, session: any, - fetchLiveList: () => void, + fetchLiveList: (params: any) => void, } function SessionList(props: Props) { useEffect(() => { - props.fetchLiveList(); + const params: any = {} + if (props.session.userId) { + params.userId = props.session.userId + } + props.fetchLiveList(params); }, []) return ( diff --git a/frontend/app/duck/sessions.js b/frontend/app/duck/sessions.js index 0c46cc54a..6fcdb15c5 100644 --- a/frontend/app/duck/sessions.js +++ b/frontend/app/duck/sessions.js @@ -316,10 +316,10 @@ export function fetchInsights(params) { }; } -export function fetchLiveList() { +export function fetchLiveList(params = {}) { return { types: FETCH_LIVE_LIST.toArray(), - call: client => client.get('/assist/sessions', { userId: 'test'}), + call: client => client.get('/assist/sessions', params), }; }