From 44ecda3c67d51a86becb967d7bd3ef9bfa4d2aa7 Mon Sep 17 00:00:00 2001 From: beckerinj Date: Sat, 6 Aug 2022 11:14:40 -0400 Subject: [PATCH] cleanup --- frontend/src/components/deployment/Actions.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/deployment/Actions.tsx b/frontend/src/components/deployment/Actions.tsx index 26196005f..272c02ba4 100644 --- a/frontend/src/components/deployment/Actions.tsx +++ b/frontend/src/components/deployment/Actions.tsx @@ -26,20 +26,20 @@ import Button from "../util/Button"; const Actions: Component<{}> = (p) => { const { deployments, builds, selected } = useAppState(); const { permissions, username } = useUser(); + const show = () => + deployment() && + !deployment().isCore && + (permissions() >= 2 || deployment().owners.includes(username()!)); const deployment = () => deployments.get(selected.id())!; const showBuild = () => { - const build = deployment().buildID ? builds.get(deployment().buildID!) : undefined; + const build = deployment().buildID + ? builds.get(deployment().buildID!) + : undefined; return build ? true : false; - } + }; const { themeClass } = useTheme(); return ( - = 2 || deployment().owners.includes(username()!)) - } - > +

actions