From 39dc3ec8d64185554a4662cb904ce83bcaa92773 Mon Sep 17 00:00:00 2001 From: Nyagami Date: Sun, 14 Jan 2024 11:34:04 +0700 Subject: [PATCH] fix: center label when no badge in library --- src/screens/library/LibraryScreen.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/screens/library/LibraryScreen.tsx b/src/screens/library/LibraryScreen.tsx index 672f457b..577e433b 100644 --- a/src/screens/library/LibraryScreen.tsx +++ b/src/screens/library/LibraryScreen.tsx @@ -102,17 +102,20 @@ const LibraryScreen = ({ navigation }: LibraryScreenProps) => { renderLabel={({ route, color }) => ( {route.title} - - {showNumberOfNovels && ( + {showNumberOfNovels && ( + {(route as any)?.novels.length} - )} - + + )} )} inactiveColor={theme.secondary} @@ -319,6 +322,7 @@ const styles = StyleSheet.create({ bottom: 0, }, badgeCtn: { + position: 'relative', borderRadius: 50, marginHorizontal: 6, paddingHorizontal: 6,