From 634a69e79c5ee07773dc60dd6720e03e3f15b643 Mon Sep 17 00:00:00 2001 From: Grant Date: Thu, 23 May 2024 15:10:15 -0600 Subject: [PATCH] chat settings require being logged in to view --- packages/client/src/components/Chat/InnerChatSettings.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/client/src/components/Chat/InnerChatSettings.tsx b/packages/client/src/components/Chat/InnerChatSettings.tsx index 090f6e4..07e1046 100644 --- a/packages/client/src/components/Chat/InnerChatSettings.tsx +++ b/packages/client/src/components/Chat/InnerChatSettings.tsx @@ -1,9 +1,15 @@ import { Button } from "@nextui-org/react"; import { useChatContext } from "../../contexts/ChatContext"; +import { useAppContext } from "../../contexts/AppContext"; const InnerChatSettings = () => { + const { user: authUser } = useAppContext(); const { user, doLogin, doLogout } = useChatContext(); + if (!authUser) { + return <>You must be logged in first; + } + return ( <> {!user && }