added english language
This commit is contained in:
@@ -8,8 +8,10 @@ import { useUnread } from "../context/UnreadContext";
|
||||
import { API_URL } from "../config/authConstants";
|
||||
import Picker from "@emoji-mart/react";
|
||||
import emojiData from "@emoji-mart/data";
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export default function ChatPage() {
|
||||
const { t } = useTranslation();
|
||||
const { chatId } = useParams();
|
||||
const navigate = useNavigate();
|
||||
const { fetchMessages, markAsRead } = useChats();
|
||||
@@ -83,15 +85,15 @@ export default function ChatPage() {
|
||||
post?.emoji || "📋"
|
||||
)}
|
||||
</div>
|
||||
<div className="chat-header-title">{post?.title || "Чат"}</div>
|
||||
<div className="chat-header-title">{post?.title || t('chat.title')}</div>
|
||||
<div className={`chat-status${connected ? " connected" : ""}`}>
|
||||
{connected ? "В сети" : "Отключено"}
|
||||
{connected ? t('chat.online') : t('chat.offline')}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="chat-messages">
|
||||
{messages.length === 0 && (
|
||||
<div className="chat-empty">Нет сообщений</div>
|
||||
<div className="chat-empty">{t('chat.noMessages')}</div>
|
||||
)}
|
||||
{messages.map((m) => (
|
||||
<div
|
||||
@@ -123,7 +125,7 @@ export default function ChatPage() {
|
||||
<input
|
||||
value={input}
|
||||
onChange={(e) => setInput(e.target.value)}
|
||||
placeholder="Сообщение..."
|
||||
placeholder={t('chat.messagePlaceholder')}
|
||||
className="chat-input"
|
||||
/>
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user