refactor: more TS code
This commit is contained in:
@@ -10,6 +10,8 @@ const Styled = styled.div`
|
||||
filter: drop-shadow(0px 25px 50px rgba(31, 41, 55, 0.25));
|
||||
border-radius: 12px;
|
||||
min-width: 486px;
|
||||
max-height: 90vh;
|
||||
overflow-y: scroll;
|
||||
/* width: fit-content; */
|
||||
> .head {
|
||||
font-weight: 600;
|
||||
|
||||
@@ -32,7 +32,7 @@ export default function ChatPage() {
|
||||
? null
|
||||
: { key: `user_${user_id}`, mid: null, unreads: 0, id: user_id, type: "user" };
|
||||
// console.log("temp uid", tmpUid);
|
||||
const placeholderVisible = !channel_id && !user_id;
|
||||
const placeholderVisible = channel_id == 0 && user_id == 0;
|
||||
return (
|
||||
<>
|
||||
{channelModalVisible && (
|
||||
@@ -47,8 +47,8 @@ export default function ChatPage() {
|
||||
</div>
|
||||
<div className={`right ${placeholderVisible ? "placeholder" : ""}`}>
|
||||
{placeholderVisible && <BlankPlaceholder />}
|
||||
{channel_id && <ChannelChat cid={+channel_id} />}
|
||||
{user_id && <DMChat uid={+user_id} />}
|
||||
{channel_id !== 0 && <ChannelChat cid={+channel_id} />}
|
||||
{user_id !== 0 && <DMChat uid={+user_id} />}
|
||||
</div>
|
||||
</StyledWrapper>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user