From 7f80e0310c13e2ead19861b8c6fbc4a13b76da51 Mon Sep 17 00:00:00 2001 From: Ai Date: Fri, 22 May 2026 11:19:36 +0300 Subject: [PATCH] fix: vite-env.d.ts for import.meta.env types, fix isOnline boolean cast --- frontend/src/components/ChatHeader.tsx | 2 +- frontend/src/vite-env.d.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 frontend/src/vite-env.d.ts diff --git a/frontend/src/components/ChatHeader.tsx b/frontend/src/components/ChatHeader.tsx index 113c04d..76546fc 100644 --- a/frontend/src/components/ChatHeader.tsx +++ b/frontend/src/components/ChatHeader.tsx @@ -19,7 +19,7 @@ export default function ChatHeader({ chat, onBack, onRefresh, onShowInfo }: Prop const typing = typingUsers[chat.id] || []; const isPrivate = chat.type === 'private'; - const isOnline = isPrivate && chat.privateUserId && onlineUsers.has(chat.privateUserId); + const isOnline = !!(isPrivate && chat.privateUserId && onlineUsers.has(chat.privateUserId)); let subtitle = ''; if (typing.length > 0) { diff --git a/frontend/src/vite-env.d.ts b/frontend/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/frontend/src/vite-env.d.ts @@ -0,0 +1 @@ +///