From 541e1003e63daadad4814b6161cac0b4db3524d6 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Mon, 7 Feb 2022 10:12:27 -0800 Subject: [PATCH] stale state --- .../MainTabsOrPages/Conversations.tsx | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/web/components/MainTabsOrPages/Conversations.tsx b/packages/web/components/MainTabsOrPages/Conversations.tsx index 494fb27..f3d2e22 100644 --- a/packages/web/components/MainTabsOrPages/Conversations.tsx +++ b/packages/web/components/MainTabsOrPages/Conversations.tsx @@ -18,6 +18,7 @@ import LiveRoom from "../Conversations/LiveRoom"; import Conversation from "@nirvana/common/models/conversation"; import { useRecoilValue } from "recoil"; import { + countNavigationContentSelector, liveRoomsSelector, RelativeTimeConvosSections, RelativeTimeSeparatedConvosSelector, @@ -45,6 +46,26 @@ export default function Conversations() { RelativeTimeConvosSections.oldJunk ); + const navConvoCounts = useRecoilValue(countNavigationContentSelector); + const isStaleState = + navConvoCounts.liveCount == 0 && navConvoCounts.defaultCount == 0; + + if (isStaleState) { + return ( +
+ + + + + {"Oh the sound of silence..."} + +
+ ); + } + return ( <> {/* live */}