Skip to content

Commit

Permalink
feat: Show new meeting snack also on summary page (#9231)
Browse files Browse the repository at this point in the history
* 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.

* Fix demo
  • Loading branch information
Dschoordsch committed Dec 12, 2023
1 parent 01d04fc commit 42bde5e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/client/modules/demo/initDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,9 @@ const initDB = (botScript: ReturnType<typeof initBotScript>) => {
teamMembers.forEach((teamMember) => {
;(teamMember as any).team = team
})
users.forEach((user) => {
;(user as any).teams = [team]
})
team.meetingSettings.team = team as any
newMeeting.commentCount = 0
newMeeting.reflectionCount = 0
Expand Down
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 42bde5e

Please sign in to comment.