import { RenderMessages } from "@components/Message";
import { useState, type ReactElement } from "react";
import { Chatbar } from "@components/Chatbar.tsx";
import { ChannelBar } from "@components/ChannelBar.tsx";
import { ServerBar } from "@components/ServerBar.tsx";

export function App(): ReactElement {
  const [serverName, setServerName] = useState("undefined");

  return (
    <div>
      <ServerBar setServerName={setServerName} currentServer={serverName} />
      <ChannelBar servername={serverName} />
      <RenderMessages />
      <Chatbar />
    </div>
  )
}