2024-07-20 13:30:01 +02:00
|
|
|
import "./chatEntry.css";
|
|
|
|
|
|
2024-07-20 05:10:50 +02:00
|
|
|
import * as React from "bloatless-react";
|
|
|
|
|
|
2024-07-20 14:16:26 +02:00
|
|
|
import ChatViewModel from "../../ViewModel/chatViewModel";
|
2024-07-20 05:10:50 +02:00
|
|
|
|
2024-07-20 14:16:26 +02:00
|
|
|
export function ChatEntry(chatViewModel: ChatViewModel) {
|
2024-07-20 05:10:50 +02:00
|
|
|
return (
|
2024-07-20 14:16:26 +02:00
|
|
|
<button class="chat-entry tile" on:click={chatViewModel.open}>
|
|
|
|
|
<span
|
|
|
|
|
class="shadow"
|
|
|
|
|
subscribe:innerText={chatViewModel.primaryChannel}
|
|
|
|
|
></span>
|
|
|
|
|
<h2 subscribe:innerText={chatViewModel.primaryChannel}></h2>
|
2024-07-20 13:30:01 +02:00
|
|
|
</button>
|
2024-07-20 05:10:50 +02:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-20 14:16:26 +02:00
|
|
|
export const ChatViewModelToChatEntry: React.StateItemConverter<
|
|
|
|
|
ChatViewModel
|
|
|
|
|
> = (chatViewModel: ChatViewModel) => {
|
|
|
|
|
return ChatEntry(chatViewModel);
|
2024-07-20 05:10:50 +02:00
|
|
|
};
|