mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-07-31 03:01:42 +08:00
feat: add message request loader
This commit is contained in:
@ -2,7 +2,12 @@ import { useEffect } from "react";
|
||||
import { useChatStore } from "@/store";
|
||||
import Icon from "../Icon";
|
||||
|
||||
const Header = () => {
|
||||
interface Props {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const Header = (props: Props) => {
|
||||
const { className } = props;
|
||||
const chatStore = useChatStore();
|
||||
const currentChat = chatStore.currentChat;
|
||||
const title = currentChat?.title || "SQL Chat";
|
||||
@ -12,7 +17,11 @@ const Header = () => {
|
||||
}, [title]);
|
||||
|
||||
return (
|
||||
<div className="sticky top-0 w-full flex flex-row justify-between items-center lg:grid lg:grid-cols-3 py-2 border-b bg-white z-1">
|
||||
<div
|
||||
className={`${
|
||||
className || ""
|
||||
} sticky top-0 w-full flex flex-row justify-between items-center lg:grid lg:grid-cols-3 py-2 border-b bg-white z-1`}
|
||||
>
|
||||
<div className="ml-2 flex justify-center items-center">
|
||||
<label htmlFor="connection-drawer" className="w-8 h-8 p-1 mr-1 block lg:hidden rounded-md cursor-pointer hover:bg-gray-100">
|
||||
<Icon.IoIosMenu className="text-gray-600 w-full h-auto" />
|
||||
|
Reference in New Issue
Block a user