Skip to content

Commit

Permalink
Merge pull request #805 from BIDMCDigitalPsychiatry/issue-783
Browse files Browse the repository at this point in the history
sensor events after moving conversations tab
  • Loading branch information
sarithapillai8 authored Jan 25, 2024
2 parents 9fcf57b + 9b52090 commit a989fd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/NavigationLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ export default function NavigationLayout({

const updateAnalytics = async () => {
setSensorData(null)
window.location.href = `/#/participant/${id}/messages`
await sensorEventUpdate("conversations", id, null)
let data = await LAMP.SensorEvent.allByParticipant(id, "lamp.analytics")
data = data.filter((d) => d.data.page === "conversations")
data = (data || []).filter((d) => d.data.page === "conversations")
setSensorData(data ? data[0] : [])
window.location.href = `/#/participant/${id}/messages`
}

const refreshMessages = async () => {
Expand Down

0 comments on commit a989fd3

Please sign in to comment.