improve stuff

This commit is contained in:
MeowcaTheoRange 2024-05-09 16:20:28 -05:00
parent 12ff17f794
commit e4f7a403b7

View file

@ -194,7 +194,7 @@ export default function Home() {
}); });
} }
const canDelete = whoamiRef.current.admin || whoamiRef.current.id == message.user; const canDelete = whoamiRef.current.admin || whoamiRef.current.id == message.user;
const timeSent = new Date(message.timestamp * 1000).toLocaleTimeString(); const timeSent = new Date(message.timestamp * 1000).toLocaleString();
return <div className={styles.Message} key={message.id}> return <div className={styles.Message} key={message.id}>
<h3 className={styles.MessageHeader}> <h3 className={styles.MessageHeader}>
{user?.id != null ? {user?.id != null ?
@ -339,6 +339,7 @@ export default function Home() {
} }
return x; return x;
})); }));
socket.emit('SIG_CHAT_CHGCHANNEL', { channel: data[0].name }, chgchannelChatRes);
} }
} }
@ -395,7 +396,7 @@ export default function Home() {
return ( return (
<ChatLayout <ChatLayout
title="Chat" title={`#${channel}`}
subtitle={error} subtitle={error}
props={{ props={{
channels, channels,