Skip to content

Commit

Permalink
feat: Show new meeting snack also on summary page
Browse files Browse the repository at this point in the history
Because the meeting summary shows the sidebar as well, this feels more
in line with the user expectation.
  • Loading branch information
Dschoordsch committed Nov 21, 2023
1 parent 6c08b30 commit 980f641
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import MeetingLockedOverlay from '../../../components/MeetingLockedOverlay'
import useDocumentTitle from '../../../hooks/useDocumentTitle'
import useRouter from '../../../hooks/useRouter'
import useSidebar from '../../../hooks/useSidebar'
import useSnacksForNewMeetings from '../../../hooks/useSnacksForNewMeetings'
import {APP_CORS_OPTIONS} from '../../../types/cors'
import {MEETING_SUMMARY_LABEL} from '../../../utils/constants'
import isDemoRoute from '../../../utils/isDemoRoute'
Expand Down Expand Up @@ -35,6 +36,11 @@ const query = graphql`
}
name
}
teams {
activeMeetings {
...useSnacksForNewMeetings_meetings
}
}
}
}
`
Expand All @@ -43,7 +49,8 @@ const NewMeetingSummary = (props: Props) => {
const {urlAction, queryRef} = props
const data = usePreloadedQuery<NewMeetingSummaryQuery>(query, queryRef)
const {viewer} = data
const {newMeeting} = viewer
const {newMeeting, teams} = viewer
const activeMeetings = teams.flatMap((team) => team.activeMeetings).filter(Boolean)
const {history} = useRouter()
useEffect(() => {
if (!newMeeting) {
Expand All @@ -65,6 +72,7 @@ const NewMeetingSummary = (props: Props) => {
? `/retrospective-demo-summary/csv`
: `/new-summary/${meetingId}/csv`

useSnacksForNewMeetings(activeMeetings as any)
return (
<>
{!isDemoRoute() && (
Expand Down

0 comments on commit 980f641

Please sign in to comment.