From d3e175a31d74414716f4d044c27aa0cee287a189 Mon Sep 17 00:00:00 2001 From: Brian Cao Date: Thu, 17 Aug 2023 21:25:12 -0700 Subject: [PATCH] Hide edit button cloudMode. --- components/pages/settings/websites/WebsitesList.js | 10 +++++++++- components/pages/settings/websites/WebsitesTable.js | 3 ++- components/pages/websites/WebsitesPage.js | 12 ++++++++++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/components/pages/settings/websites/WebsitesList.js b/components/pages/settings/websites/WebsitesList.js index 538fc61a..f1a2eb0f 100644 --- a/components/pages/settings/websites/WebsitesList.js +++ b/components/pages/settings/websites/WebsitesList.js @@ -9,7 +9,14 @@ import useUser from 'hooks/useUser'; import { ROLES } from 'lib/constants'; import { Button, Icon, Icons, Modal, ModalTrigger, Text, useToasts } from 'react-basics'; -export function WebsitesList({ showTeam, showHeader = true, includeTeams, onlyTeams, fetch }) { +export function WebsitesList({ + showTeam, + showEditButton = true, + showHeader = true, + includeTeams, + onlyTeams, + fetch, +}) { const { formatMessage, labels, messages } = useMessages(); const { user } = useUser(); @@ -59,6 +66,7 @@ export function WebsitesList({ showTeam, showHeader = true, includeTeams, onlyTe - {(!showTeam || ownerId === user.id) && ( + {showEditButton && (!showTeam || ownerId === user.id) && (