From 8a0e58595d3d07c0e346f32441f62baa664f19ed Mon Sep 17 00:00:00 2001 From: Rory Doak Date: Mon, 22 Jul 2024 10:44:59 +0100 Subject: [PATCH] Add Permissions component to handle isPlatformAdmin logic --- editor.planx.uk/src/pages/Teams.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/editor.planx.uk/src/pages/Teams.tsx b/editor.planx.uk/src/pages/Teams.tsx index ef1da7b68c..4447ee701f 100644 --- a/editor.planx.uk/src/pages/Teams.tsx +++ b/editor.planx.uk/src/pages/Teams.tsx @@ -8,6 +8,7 @@ import navigation from "lib/navigation"; import React from "react"; import { Link } from "react-navi"; import { borderedFocusStyle } from "theme"; +import Permission from "ui/editor/Permission"; import { slugify } from "utils"; import { useStore } from "./FlowEditor/lib/store"; @@ -93,7 +94,7 @@ const Teams: React.FC = ({ teams, teamTheme }) => { Select a team - {isPlatformAdmin ? ( + { const newTeamName = prompt("Team name"); @@ -118,7 +119,7 @@ const Teams: React.FC = ({ teams, teamTheme }) => { > Add a new team - ) : null} + {editableTeams.length > 0 && ( <>