Commit 6ff5c773 authored by Grant's avatar Grant Committed by Grant
Browse files

[wip] initial work

parent 372f5686
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ const AppInner = () => {
      {config && <CanvasWrapper />}
      <ToolbarWrapper />

      {/* <DynamicallyLoadChat /> */}
      <DynamicallyLoadChat />

      <DebugModal />
      <SettingsSidebar />
+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>
  );
};

+3 −0
Original line number Diff line number Diff line
@@ -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 }>();
@@ -311,6 +312,8 @@ export const AppContext = ({ children }: PropsWithChildren) => {
        undo,
        loadChat,
        setLoadChat,
        chatSidebar,
        setChatSidebar,
        connected,
        pixelWhois,
        setPixelWhois,