chat settings require being logged in to view

This commit is contained in:
Grant 2024-05-23 15:10:15 -06:00
parent 099713dd50
commit 634a69e79c
1 changed files with 6 additions and 0 deletions

View File

@ -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 && <Button onClick={doLogin}>Login</Button>}