|
|
@ -180,20 +180,20 @@ export const ChatDisplay: Component<ChatDisplayProps> = (props) => {
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Suspense>
|
|
|
|
<Suspense>
|
|
|
|
<Index each={chatLog().messages}>
|
|
|
|
<For each={chatLog().messages}>
|
|
|
|
{(item: Accessor<ChatMessageData>, index: number) => {
|
|
|
|
{(item: ChatMessageData, index: Accessor<number>) => {
|
|
|
|
const chatCommand = item().message.command;
|
|
|
|
const chatCommand = item.message.command;
|
|
|
|
if (chatCommand === "PRIVMSG") {
|
|
|
|
if (chatCommand === "PRIVMSG") {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<ChatMessage chatMessage={item()} chatLog={chatLog()} videoTime={props.videoTime} />
|
|
|
|
<ChatMessage chatMessage={item} chatLog={chatLog()} videoTime={props.videoTime} />
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else if (chatCommand === "USERNOTICE") {
|
|
|
|
} else if (chatCommand === "USERNOTICE") {
|
|
|
|
return <SystemMessage chatMessage={item()} videoTime={props.videoTime} />;
|
|
|
|
return <SystemMessage chatMessage={item} videoTime={props.videoTime} />;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return <></>;
|
|
|
|
return <></>;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
</Index>
|
|
|
|
</For>
|
|
|
|
</Suspense>
|
|
|
|
</Suspense>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|