chore: updates

This commit is contained in:
Tristan Yang
2023-01-29 09:28:11 +08:00
parent 46113159d2
commit 0abf149188
8 changed files with 43 additions and 67 deletions
+7 -7
View File
@@ -10,7 +10,7 @@ import ChannelModal from "../../common/component/ChannelModal";
import SessionList from "./SessionList";
import { useAppSelector } from "../../app/store";
import GuestBlankPlaceholder from "./GuestBlankPlaceholder";
import GuestChannelChatInfo from "./GuestChannelChatInfo";
import GuestChannelChat from "./GuestChannelChat";
import GuestSessionList from "./GuestSessionList";
function ChatPage() {
const [channelModalVisible, setChannelModalVisible] = useState(false);
@@ -32,11 +32,11 @@ function ChatPage() {
sessionUids.findIndex((i) => i == user_id) > -1
? undefined
: {
key: `user_${user_id}`,
unreads: 0,
id: +user_id,
type: "user" as "user" | "channel"
};
key: `user_${user_id}`,
unreads: 0,
id: +user_id,
type: "user" as "user" | "channel"
};
// console.log("temp uid", tmpUid);
const placeholderVisible = channel_id == 0 && user_id == 0;
return (
@@ -54,7 +54,7 @@ function ChatPage() {
{placeholderVisible && (isGuest ? <GuestBlankPlaceholder /> : <BlankPlaceholder />)}
{channel_id !== 0 &&
(isGuest ? (
<GuestChannelChatInfo cid={+channel_id} />
<GuestChannelChat cid={+channel_id} />
) : (
<ChannelChat cid={+channel_id} />
))}