Loading packages/client/src/components/Chat/Chat.tsx 0 → 100644 +23 −0 Original line number Diff line number Diff line import { useEffect, useRef, useState } from "react"; import { faComments } from "@fortawesome/free-solid-svg-icons"; import { useAppContext } from "../../contexts/AppContext"; import { SidebarBase } from "../SidebarBase"; const Chat = () => { const { chatSidebar, setChatSidebar } = useAppContext(); return ( <SidebarBase shown={chatSidebar} setSidebarShown={setChatSidebar} icon={faComments} title="Chat" description="" side="Right" > <div>hi</div> </SidebarBase> ); }; export default Chat; packages/client/src/contexts/AppContext.tsx +3 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,7 @@ export const AppContext = ({ children }: PropsWithChildren) => { // --- settings --- const [loadChat, _setLoadChat] = useState(false); const [chatSidebar, setChatSidebar] = useState(false); const [undo, setUndo] = useState<{ available: true; expireAt: number }>(); Loading Loading @@ -364,6 +365,8 @@ export const AppContext = ({ children }: PropsWithChildren) => { undo, loadChat, setLoadChat, chatSidebar, setChatSidebar, connected, blankOverlay, setBlankOverlay, Loading packages/client/src/components/App.tsx +1 −1 File changed.Contains only whitespace changes. Show changes Loading
packages/client/src/components/Chat/Chat.tsx 0 → 100644 +23 −0 Original line number Diff line number Diff line import { useEffect, useRef, useState } from "react"; import { faComments } from "@fortawesome/free-solid-svg-icons"; import { useAppContext } from "../../contexts/AppContext"; import { SidebarBase } from "../SidebarBase"; const Chat = () => { const { chatSidebar, setChatSidebar } = useAppContext(); return ( <SidebarBase shown={chatSidebar} setSidebarShown={setChatSidebar} icon={faComments} title="Chat" description="" side="Right" > <div>hi</div> </SidebarBase> ); }; export default Chat;
packages/client/src/contexts/AppContext.tsx +3 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,7 @@ export const AppContext = ({ children }: PropsWithChildren) => { // --- settings --- const [loadChat, _setLoadChat] = useState(false); const [chatSidebar, setChatSidebar] = useState(false); const [undo, setUndo] = useState<{ available: true; expireAt: number }>(); Loading Loading @@ -364,6 +365,8 @@ export const AppContext = ({ children }: PropsWithChildren) => { undo, loadChat, setLoadChat, chatSidebar, setChatSidebar, connected, blankOverlay, setBlankOverlay, Loading
packages/client/src/components/App.tsx +1 −1 File changed.Contains only whitespace changes. Show changes