From 3c476f810f6e51d58413297c2e1b88173281ec35 Mon Sep 17 00:00:00 2001 From: Georg Bremer Date: Thu, 27 Jun 2024 16:07:53 +0200 Subject: [PATCH] fix: User can change team in Activity Library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🎵 Yo, yo, listen up, here's the scoop, Use MenuItem within MenuContent, that's the truth. Don't break the rules, follow the flow, And your code will work without an error show. 🎵 --- .../NewMeetingActionsCurrentMeetings.tsx | 2 +- .../components/NewMeetingTeamPicker.tsx | 93 ++++++++++--------- 2 files changed, 49 insertions(+), 46 deletions(-) diff --git a/packages/client/components/NewMeetingActionsCurrentMeetings.tsx b/packages/client/components/NewMeetingActionsCurrentMeetings.tsx index 6658f3c3b4b..4c75e29d853 100644 --- a/packages/client/components/NewMeetingActionsCurrentMeetings.tsx +++ b/packages/client/components/NewMeetingActionsCurrentMeetings.tsx @@ -57,7 +57,7 @@ const NewMeetingActionsCurrentMeetings = (props: Props) => { } > - + diff --git a/packages/client/components/NewMeetingTeamPicker.tsx b/packages/client/components/NewMeetingTeamPicker.tsx index 9ce8af3b5bb..3fe1a6b1ada 100644 --- a/packages/client/components/NewMeetingTeamPicker.tsx +++ b/packages/client/components/NewMeetingTeamPicker.tsx @@ -8,6 +8,7 @@ import {NewMeetingTeamPicker_teams$key} from '~/__generated__/NewMeetingTeamPick import useAtmosphere from '../hooks/useAtmosphere' import {PALETTE} from '../styles/paletteV3' import {Menu} from '../ui/Menu/Menu' +import {MenuContent} from '../ui/Menu/MenuContent' import setPreferredTeamId from '../utils/relay/setPreferredTeamId' import NewMeetingTeamPickerAvatars from './NewMeetingTeamPickerAvatars' @@ -72,52 +73,54 @@ const NewMeetingTeamPicker = (props: Props) => { } > -
- {onShareToOrg ? ( -
-
- This custom activity is private to the {selectedTeam.name} team. + +
+ {onShareToOrg ? ( +
+
+ This custom activity is private to the {selectedTeam.name} team. +
+
+
+ As a member of the team you can share this activity with other teams at the{' '} + {selectedTeam.organization.name} organization so that they can also use the + activity. +
+
-
-
- As a member of the team you can share this activity with other teams at the{' '} - {selectedTeam.organization.name} organization so that they can also use the - activity. -
- -
- ) : ( - <> - - Select Team: - - -
- {teams.map((team) => { - return ( - { - handleSelectTeam(team.id) - }} - > - {team.name} - - ) - })} -
- - )} -
+ ) : ( + <> + + Select Team: + + +
+ {teams.map((team) => { + return ( + { + handleSelectTeam(team.id) + }} + > + {team.name} + + ) + })} +
+ + )} +
+ ) }