From 257d2607ea29b7ae7f4c4070c4310338e01d136b Mon Sep 17 00:00:00 2001
From: Prajwal Khadgi <123072058+Prajwalism@users.noreply.github.com>
Date: Mon, 22 Jul 2024 11:29:27 +0545
Subject: [PATCH] feat: hide add project button when signed in as drone
operator (#79)
---
.../Projects/ProjectsHeader/index.tsx | 20 ++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/src/frontend/src/components/Projects/ProjectsHeader/index.tsx b/src/frontend/src/components/Projects/ProjectsHeader/index.tsx
index 1451886e..5c69cbd2 100644
--- a/src/frontend/src/components/Projects/ProjectsHeader/index.tsx
+++ b/src/frontend/src/components/Projects/ProjectsHeader/index.tsx
@@ -8,7 +8,11 @@ import { Button } from '@Components/RadixComponents/Button';
export default function ProjectsHeader() {
const dispatch = useTypedDispatch();
const navigate = useNavigate();
+
+ const signedInAs = localStorage.getItem('signedInAs') || 'Project Creator';
+
const showMap = useTypedSelector(state => state.common.showMap);
+
return (
Projects
@@ -22,13 +26,15 @@ export default function ProjectsHeader() {
}}
/>
-
+ {signedInAs === 'Project Creator' && (
+
+ )}
);