From 889e6b4cc7f02572acb3c12f154b16e14c290bd9 Mon Sep 17 00:00:00 2001 From: balzack Date: Mon, 24 Oct 2022 00:16:32 -0700 Subject: [PATCH] fixing layout error --- app/mobile/src/session/cards/Cards.jsx | 19 +++++++++++++------ app/mobile/src/session/channels/Channels.jsx | 8 ++++---- .../src/session/channels/Channels.styled.js | 11 +++++++++-- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/app/mobile/src/session/cards/Cards.jsx b/app/mobile/src/session/cards/Cards.jsx index 89ef75c7..959f1fc4 100644 --- a/app/mobile/src/session/cards/Cards.jsx +++ b/app/mobile/src/session/cards/Cards.jsx @@ -85,12 +85,19 @@ export function Cards({ openRegistry, openContact }) { New - } - keyExtractor={item => item.cardId} - /> + { state.cards.length == 0 && ( + + No Contacts Found + + )} + { state.cards.length != 0 && ( + } + keyExtractor={item => item.cardId} + /> + )} )} { !state.tabbed && ( diff --git a/app/mobile/src/session/channels/Channels.jsx b/app/mobile/src/session/channels/Channels.jsx index e492e087..e985c32f 100644 --- a/app/mobile/src/session/channels/Channels.jsx +++ b/app/mobile/src/session/channels/Channels.jsx @@ -45,8 +45,8 @@ export function ChannelsBody({ state, actions, openConversation }) { return ( <> { state.channels.length == 0 && ( - - No Topics Found + + No Topics Found )} { state.channels.length > 0 && ( @@ -114,8 +114,8 @@ export function Channels({ openConversation }) { { state.channels.length == 0 && ( - - No Topics Found + + No Topics Found )} { state.channels.length != 0 && ( diff --git a/app/mobile/src/session/channels/Channels.styled.js b/app/mobile/src/session/channels/Channels.styled.js index 74f4793c..eec328f9 100644 --- a/app/mobile/src/session/channels/Channels.styled.js +++ b/app/mobile/src/session/channels/Channels.styled.js @@ -57,6 +57,15 @@ export const styles = StyleSheet.create({ flexShrink: 1, }, notfound: { + flexShrink: 1, + flexGrow: 1, + width: '100%', + paddingLeft: 16, + paddingRight: 16, + alignItems: 'center', + justifyContent: 'center', + }, + notfoundtext: { fontSize: 20, color: Colors.grey, }, @@ -66,8 +75,6 @@ export const styles = StyleSheet.create({ width: '100%', paddingLeft: 16, paddingRight: 16, - alignItems: 'center', - justifyContent: 'center', }, addbottom: { backgroundColor: Colors.primary,