refactor: widget theme color

This commit is contained in:
Tristan Yang
2023-02-08 22:36:45 +08:00
parent c6f9cc2cef
commit 4435d83580
9 changed files with 78 additions and 16 deletions
+2 -3
View File
@@ -9,11 +9,10 @@ import useSSE from '../useSSE';
type Props = {
hostId: number,
themeColor?: string,
handleClose: () => void
}
const Index = ({ handleClose, hostId, themeColor }: Props) => {
const Index = ({ handleClose, hostId }: Props) => {
// 建立SSE连接
useSSE();
const { user: loginUser, token, guest: isGuest } = useAppSelector(store => store.authData);
@@ -22,7 +21,7 @@ const Index = ({ handleClose, hostId, themeColor }: Props) => {
const notLogin = !token || isGuest;
return (
<aside className="flex flex-col bg-white w-full h-full rounded-md overflow-hidden">
<Header themeColor={themeColor} handleClose={handleClose} />
<Header handleClose={handleClose} />
{/* message list */}
<main id='MESSAGE_LIST_CONTAINER' className="relative flex-1 overflow-y-auto scroll-smooth">
{/* placeholder */}