From f7a7d764136c39143f7f28b67a45977aabe61051 Mon Sep 17 00:00:00 2001 From: Zubair Imtiaz <106450046+ZubairImtiaz3@users.noreply.github.com> Date: Fri, 11 Oct 2024 18:14:45 +0500 Subject: [PATCH] [MM-60834] Replace FormattedMarkdownMessage in 'webapp/channels/src/components/select_team/select_team.tsx' with FormattedMessage (#28621) --- .../src/components/select_team/index.ts | 1 - .../components/select_team/select_team.tsx | 20 +++++++++++-------- webapp/channels/src/i18n/en.json | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/webapp/channels/src/components/select_team/index.ts b/webapp/channels/src/components/select_team/index.ts index 5a4917ca2e..0baa9878fd 100644 --- a/webapp/channels/src/components/select_team/index.ts +++ b/webapp/channels/src/components/select_team/index.ts @@ -48,7 +48,6 @@ function mapStateToProps(state: GlobalState) { canManageSystem: haveISystemPermission(state, {permission: Permissions.MANAGE_SYSTEM}), canJoinPublicTeams: haveISystemPermission(state, {permission: Permissions.JOIN_PUBLIC_TEAMS}), canJoinPrivateTeams: haveISystemPermission(state, {permission: Permissions.JOIN_PRIVATE_TEAMS}), - siteURL: config.SiteURL, totalTeamsCount: state.entities.teams.totalCount || 0, isCloud, isFreeTrial, diff --git a/webapp/channels/src/components/select_team/select_team.tsx b/webapp/channels/src/components/select_team/select_team.tsx index abafce1e19..d3c3e36df8 100644 --- a/webapp/channels/src/components/select_team/select_team.tsx +++ b/webapp/channels/src/components/select_team/select_team.tsx @@ -18,7 +18,6 @@ import AnnouncementBar from 'components/announcement_bar'; import BackButton from 'components/common/back_button'; import InfiniteScroll from 'components/common/infinite_scroll'; import SiteNameAndDescription from 'components/common/site_name_and_description'; -import FormattedMarkdownMessage from 'components/formatted_markdown_message'; import LoadingScreen from 'components/loading_screen'; import LearnAboutTeamsLink from 'components/main_menu/learn_about_teams_link'; import SystemPermissionGate from 'components/permissions_gates/system_permission_gate'; @@ -53,7 +52,6 @@ type Props = { canJoinPublicTeams: boolean; canJoinPrivateTeams: boolean; history?: any; - siteURL?: string; actions: Actions; totalTeamsCount: number; isCloud: boolean; @@ -117,7 +115,7 @@ export default class SelectTeam extends React.PureComponent { }; handleTeamClick = async (team: Team) => { - const {siteURL, currentUserRoles} = this.props; + const {currentUserRoles} = this.props; this.setState({loadingTeamId: team.id}); const {data, error} = await this.props.actions.addUserToTeam(team.id, this.props.currentUserId); @@ -129,15 +127,21 @@ export default class SelectTeam extends React.PureComponent { if (error.server_error_id === TEAM_MEMBERSHIP_DENIAL_ERROR_ID) { if (currentUserRoles !== undefined && currentUserRoles.includes(Constants.PERMISSIONS_SYSTEM_ADMIN)) { errorMsg = ( - here.'} + values={{ + a: (chunks: string) => ( + + {chunks} + + ), + }} /> ); } else { errorMsg = ( - diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json index d31c595125..84809dde92 100644 --- a/webapp/channels/src/i18n/en.json +++ b/webapp/channels/src/i18n/en.json @@ -4106,7 +4106,7 @@ "invite.members.user-is-not-guest": "This person is already a member of the workspace. Invite them as a member instead of a guest.", "invite.rate-limit-exceeded": "Invite emails rate limit exceeded.", "join_team_group_constrained_denied": "You need to be a member of a linked group to join this team.", - "join_team_group_constrained_denied_admin": "You need to be a member of a linked group to join this team. You can add a group to this team [here]({siteURL}/admin_console/user_management/groups).", + "join_team_group_constrained_denied_adminText": "You need to be a member of a linked group to join this team. You can add a group to this team here.", "joinChannel.JoinButton": "Join", "joinChannel.joiningButton": "Joining...", "katex.error": "Couldn't compile your Latex code. Please review the syntax and try again.",