From 74ae7ac103670669e209683ce6a9796bb417d7a4 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Fri, 1 Apr 2022 01:02:04 +0500 Subject: [PATCH] feat: show warning if topic notes not synced --- apps/mobile/src/components/list/card.js | 4 +- apps/mobile/src/components/list/empty.js | 2 + apps/mobile/src/components/list/index.js | 4 +- .../components/listitems/headers/header.js | 24 +++++++++++- apps/mobile/src/screens/notes/index.js | 39 ++++++++++++++++--- 5 files changed, 62 insertions(+), 11 deletions(-) diff --git a/apps/mobile/src/components/list/card.js b/apps/mobile/src/components/list/card.js index d995ab52e..b06d630ba 100644 --- a/apps/mobile/src/components/list/card.js +++ b/apps/mobile/src/components/list/card.js @@ -8,7 +8,7 @@ import { SIZE } from '../../utils/size'; import { PressableButton } from '../ui/pressable'; import Paragraph from '../ui/typography/paragraph'; -export const Card = ({ color }) => { +export const Card = ({ color, warning }) => { const colors = useThemeStore(state => state.colors); color = color ? color : colors.accent; @@ -16,7 +16,7 @@ export const Card = ({ color }) => { const messageBoardState = useMessageStore(state => state.message); const announcement = useMessageStore(state => state.announcement); - return !messageBoardState.visible || selectionMode || announcement ? null : ( + return !messageBoardState.visible || selectionMode || announcement || warning ? null : ( { @@ -48,6 +49,7 @@ export const Empty = React.memo( /> {placeholderData.button && (