From 31463094fbf4c366c875bdd4e9eb05b21aff79de Mon Sep 17 00:00:00 2001 From: Georg Bremer Date: Tue, 21 Nov 2023 16:49:10 +0100 Subject: [PATCH] feat: Show new meeting snack also on summary page Because the meeting summary shows the sidebar as well, this feels more in line with the user expectation. --- .../modules/summary/components/NewMeetingSummary.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/client/modules/summary/components/NewMeetingSummary.tsx b/packages/client/modules/summary/components/NewMeetingSummary.tsx index 4d327910c06..3e891548124 100644 --- a/packages/client/modules/summary/components/NewMeetingSummary.tsx +++ b/packages/client/modules/summary/components/NewMeetingSummary.tsx @@ -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' @@ -35,6 +36,11 @@ const query = graphql` } name } + teams { + activeMeetings { + ...useSnacksForNewMeetings_meetings + } + } } } ` @@ -43,7 +49,8 @@ const NewMeetingSummary = (props: Props) => { const {urlAction, queryRef} = props const data = usePreloadedQuery(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) { @@ -65,6 +72,7 @@ const NewMeetingSummary = (props: Props) => { ? `/retrospective-demo-summary/csv` : `/new-summary/${meetingId}/csv` + useSnacksForNewMeetings(activeMeetings as any) return ( <> {!isDemoRoute() && (