Skip to content
Snippets Groups Projects
Unverified Commit d2fc26d4 authored by Timothy Carambat's avatar Timothy Carambat Committed by GitHub
Browse files

change default workspace message for default user (#922)

parent 7e7e957e
No related branches found
No related tags found
No related merge requests found
...@@ -5,8 +5,10 @@ import { useManageWorkspaceModal } from "../../../Modals/MangeWorkspace"; ...@@ -5,8 +5,10 @@ import { useManageWorkspaceModal } from "../../../Modals/MangeWorkspace";
import ManageWorkspace from "../../../Modals/MangeWorkspace"; import ManageWorkspace from "../../../Modals/MangeWorkspace";
import { ArrowDown } from "@phosphor-icons/react"; import { ArrowDown } from "@phosphor-icons/react";
import debounce from "lodash.debounce"; import debounce from "lodash.debounce";
import useUser from "@/hooks/useUser";
export default function ChatHistory({ history = [], workspace, sendCommand }) { export default function ChatHistory({ history = [], workspace, sendCommand }) {
const { user } = useUser();
const { showing, showModal, hideModal } = useManageWorkspaceModal(); const { showing, showModal, hideModal } = useManageWorkspaceModal();
const [isAtBottom, setIsAtBottom] = useState(true); const [isAtBottom, setIsAtBottom] = useState(true);
const chatHistoryRef = useRef(null); const chatHistoryRef = useRef(null);
...@@ -56,16 +58,22 @@ export default function ChatHistory({ history = [], workspace, sendCommand }) { ...@@ -56,16 +58,22 @@ export default function ChatHistory({ history = [], workspace, sendCommand }) {
<p className="text-white/60 text-lg font-base py-4"> <p className="text-white/60 text-lg font-base py-4">
Welcome to your new workspace. Welcome to your new workspace.
</p> </p>
<p className="w-full items-center text-white/60 text-lg font-base flex flex-col md:flex-row gap-x-1"> {!user || user.role !== "default" ? (
To get started either{" "} <p className="w-full items-center text-white/60 text-lg font-base flex flex-col md:flex-row gap-x-1">
<span To get started either{" "}
className="underline font-medium cursor-pointer" <span
onClick={showModal} className="underline font-medium cursor-pointer"
> onClick={showModal}
upload a document >
</span> upload a document
or <b className="font-medium italic">send a chat.</b> </span>
</p> or <b className="font-medium italic">send a chat.</b>
</p>
) : (
<p className="w-full items-center text-white/60 text-lg font-base flex flex-col md:flex-row gap-x-1">
To get started <b className="font-medium italic">send a chat.</b>
</p>
)}
<WorkspaceChatSuggestions <WorkspaceChatSuggestions
suggestions={workspace?.suggestedMessages ?? []} suggestions={workspace?.suggestedMessages ?? []}
sendSuggestion={handleSendSuggestedMessage} sendSuggestion={handleSendSuggestedMessage}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment