на оценку 5
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { MessageSquarePlus } from "lucide-react";
|
||||
|
||||
type EmptyChatProps = {
|
||||
hasChats: boolean;
|
||||
onCreateChat: () => void;
|
||||
};
|
||||
|
||||
export function EmptyChat({ hasChats, onCreateChat }: EmptyChatProps) {
|
||||
return (
|
||||
<section className="conversation conversation--empty">
|
||||
<div className="empty-chat-card">
|
||||
<span className="empty-chat-card__line" />
|
||||
<p className="eyebrow">MTUCI Messenger</p>
|
||||
<h2>{hasChats ? "Выберите чат" : "Начните разговор"}</h2>
|
||||
<p>
|
||||
{hasChats
|
||||
? "История и новые сообщения появятся здесь."
|
||||
: "Создайте первый чат и пригласите участников по UUID."}
|
||||
</p>
|
||||
{!hasChats && (
|
||||
<button className="primary-button" onClick={onCreateChat} type="button">
|
||||
<MessageSquarePlus aria-hidden="true" />
|
||||
Создать чат
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user