From 6763db21f6c131f10d0aec81c3f88c8d40e38543 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Thu, 12 Aug 2021 23:58:00 +0530 Subject: [PATCH] fix(ui) - checking for visited events --- .../Session_/PageInsightsPanel/PageInsightsPanel.tsx | 3 +-- frontend/app/duck/sessions.js | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/app/components/Session_/PageInsightsPanel/PageInsightsPanel.tsx b/frontend/app/components/Session_/PageInsightsPanel/PageInsightsPanel.tsx index 81251b38c..b83018c99 100644 --- a/frontend/app/components/Session_/PageInsightsPanel/PageInsightsPanel.tsx +++ b/frontend/app/components/Session_/PageInsightsPanel/PageInsightsPanel.tsx @@ -21,8 +21,7 @@ interface Props { function PageInsightsPanel({ filters, fetchInsights, events = [], insights, urlOptions, host, loading = true }: Props) { - const [insightsFilters, setInsightsFilters] = useState(filters) - console.log('host', host) + const [insightsFilters, setInsightsFilters] = useState(filters) const onDateChange = (e) => { const { startDate, endDate, rangeValue } = e; diff --git a/frontend/app/duck/sessions.js b/frontend/app/duck/sessions.js index d54506ddc..a78fc5234 100644 --- a/frontend/app/duck/sessions.js +++ b/frontend/app/duck/sessions.js @@ -173,12 +173,11 @@ const reducer = (state = initialState, action = {}) => { } } }) - }) - console.log('visitedEvents', visitedEvents) + }) return state.set('current', current.merge(session)) .set('eventsIndex', matching) .set('visitedEvents', visitedEvents) - .set('host', visitedEvents[0].host); + .set('host', visitedEvents[0] && visitedEvents[0].host); } case FETCH_FAVORITE_LIST.SUCCESS: return state