From ce120faa2399948c9ff791fd6490f4436ba4c1a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Mon, 9 Mar 2026 09:14:42 +0100 Subject: [PATCH] nicolium: fix chats page display with just a shoutbox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- .../src/features/chats/components/chats-page/chats-page.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/nicolium/src/features/chats/components/chats-page/chats-page.tsx b/packages/nicolium/src/features/chats/components/chats-page/chats-page.tsx index 51ceda260..761b353ac 100644 --- a/packages/nicolium/src/features/chats/components/chats-page/chats-page.tsx +++ b/packages/nicolium/src/features/chats/components/chats-page/chats-page.tsx @@ -5,6 +5,7 @@ import React, { useEffect, useLayoutEffect, useRef, useState } from 'react'; import Stack from '@/components/ui/stack'; import { chatsEmptyRoute } from '@/features/ui/router'; import { useChats } from '@/queries/chats'; +import { useShoutboxIsLoading } from '@/stores/shoutbox'; import ChatsPageSidebar from './components/chats-page-sidebar'; @@ -12,9 +13,11 @@ const ChatsPage: React.FC = () => { const { chatsQuery: { data: chats }, } = useChats(); + const showShoutbox = !useShoutboxIsLoading(); const isSidebarHidden = - !useMatch({ from: chatsEmptyRoute.id, shouldThrow: false }) || chats?.length === 0; + !useMatch({ from: chatsEmptyRoute.id, shouldThrow: false }) || + (chats?.length === 0 && !showShoutbox); const containerRef = useRef(null); const [height, setHeight] = useState('100%');