From 0141f91dda8d114214e195a949af54150c7ff3a0 Mon Sep 17 00:00:00 2001 From: Timothy Carambat Date: Wed, 7 Aug 2024 08:39:07 -0700 Subject: [PATCH 1/2] Hide upload element for default role users (#2061) resolves #2060 --- .../ChatContainer/PromptInput/AttachItem/index.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/index.jsx index 74f22f90c5..bebbfe5704 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/index.jsx @@ -1,3 +1,4 @@ +import useUser from "@/hooks/useUser"; import { PaperclipHorizontal } from "@phosphor-icons/react"; import { Tooltip } from "react-tooltip"; @@ -6,6 +7,9 @@ import { Tooltip } from "react-tooltip"; * @returns */ export default function AttachItem() { + const { user } = useUser(); + if (!!user && user.role === "default") return null; + return ( <>