From f606706ba305339cce0777274d884bf7e7389af5 Mon Sep 17 00:00:00 2001 From: strNophix Date: Thu, 20 Oct 2022 18:48:13 +0200 Subject: [PATCH] Disable chat input when user is not logged in --- client/components/chat/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/components/chat/index.tsx b/client/components/chat/index.tsx index 821b7c8..15844f3 100644 --- a/client/components/chat/index.tsx +++ b/client/components/chat/index.tsx @@ -1,10 +1,12 @@ import { FC, useEffect, useState } from "react" import { CHAT_URL } from "../../config" +import useSession from "../../hooks/useSession" import { ChatMessage as Message } from "../../types" import Input from "../common/Input" import ChatMessage from "../message/ChatMessage" const Chat: FC = () => { + const { session } = useSession() const [messages, setMessages] = useState([]) useEffect(() => { @@ -26,7 +28,11 @@ const Chat: FC = () => { ))}
- +
)