Loading packages/client/src/components/App.tsx +1 −1 Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ const AppInner = () => { {config && <CanvasWrapper />} <ToolbarWrapper /> {/* <DynamicallyLoadChat /> */} <DynamicallyLoadChat /> <DebugModal /> <SettingsSidebar /> Loading packages/client/src/components/Chat/Chat.tsx +15 −5 Original line number Diff line number Diff line import { useRef } from "react"; 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 ref = useRef<HTMLDivElement | null>(null); const { chatSidebar, setChatSidebar } = useAppContext(); return ( <div ref={ref} style={{ position: "fixed", top: 0, left: 0, zIndex: 999 }}> chat </div> <SidebarBase shown={chatSidebar} setSidebarShown={setChatSidebar} icon={faComments} title="Chat" description="" side="Right" > <div>hi</div> </SidebarBase> ); }; Loading packages/client/src/contexts/AppContext.tsx +3 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,7 @@ export const AppContext = ({ children }: PropsWithChildren) => { // --- settings --- const [loadChat, _setLoadChat] = useState(false); const [chatSidebar, setChatSidebar] = useState(false); const [pixels, setPixels] = useState({ available: 0 }); const [undo, setUndo] = useState<{ available: true; expireAt: number }>(); Loading Loading @@ -311,6 +312,8 @@ export const AppContext = ({ children }: PropsWithChildren) => { undo, loadChat, setLoadChat, chatSidebar, setChatSidebar, connected, pixelWhois, setPixelWhois, Loading Loading
packages/client/src/components/App.tsx +1 −1 Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ const AppInner = () => { {config && <CanvasWrapper />} <ToolbarWrapper /> {/* <DynamicallyLoadChat /> */} <DynamicallyLoadChat /> <DebugModal /> <SettingsSidebar /> Loading
packages/client/src/components/Chat/Chat.tsx +15 −5 Original line number Diff line number Diff line import { useRef } from "react"; 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 ref = useRef<HTMLDivElement | null>(null); const { chatSidebar, setChatSidebar } = useAppContext(); return ( <div ref={ref} style={{ position: "fixed", top: 0, left: 0, zIndex: 999 }}> chat </div> <SidebarBase shown={chatSidebar} setSidebarShown={setChatSidebar} icon={faComments} title="Chat" description="" side="Right" > <div>hi</div> </SidebarBase> ); }; Loading
packages/client/src/contexts/AppContext.tsx +3 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,7 @@ export const AppContext = ({ children }: PropsWithChildren) => { // --- settings --- const [loadChat, _setLoadChat] = useState(false); const [chatSidebar, setChatSidebar] = useState(false); const [pixels, setPixels] = useState({ available: 0 }); const [undo, setUndo] = useState<{ available: true; expireAt: number }>(); Loading Loading @@ -311,6 +312,8 @@ export const AppContext = ({ children }: PropsWithChildren) => { undo, loadChat, setLoadChat, chatSidebar, setChatSidebar, connected, pixelWhois, setPixelWhois, Loading