change(ui) - assist filter by userid

This commit is contained in:
Shekar Siri 2022-04-11 13:57:09 +02:00
parent 6ce6f72cf5
commit 410ffb1475
2 changed files with 8 additions and 4 deletions

View file

@ -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 (

View file

@ -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),
};
}