From 9e95d5acf767040914d996a43305d7fce35d2e8b Mon Sep 17 00:00:00 2001 From: Sebastian-Webster <84299475+Sebastian-Webster@users.noreply.github.com> Date: Fri, 16 Feb 2024 23:56:29 +1300 Subject: [PATCH] fix: CategoryViewPage back button is no longer misplaced when uploading posts --- components/TopNavBar.js | 5 +++-- screens/CategoryViewPage.js | 35 ++++++++++++++--------------------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/components/TopNavBar.js b/components/TopNavBar.js index 1a55749..9d2a329 100644 --- a/components/TopNavBar.js +++ b/components/TopNavBar.js @@ -13,11 +13,12 @@ const TopNavBar = ({extraStyles = {}, rightIcon, screenName, hideBackButton, hid const {colors} = useTheme(); const navigation = useNavigation(); + return ( - + {hideBackButton ? null : leftIcon || ( - {navigation.goBack()}}> + {navigation.goBack()}}> {leftIconChild || ( { const {colors, dark, indexNum} = useTheme() @@ -492,23 +491,17 @@ const CategoryViewPage = ({route, navigation}) => { <> {displayAgeRequirementWarning == false ? <> - - {navigation.goBack()}}> - - - {categoryData.NSFW == true && ( - (NSFW) - )} - {categoryData.NSFL == true && ( - (NSFL) - )} - {categoryData.categoryTitle || "Couldn't get name"} - + + {categoryData.NSFW == true && ( + (NSFW) + )} + {categoryData.NSFL == true && ( + (NSFL) + )} + {categoryData.categoryTitle || "Couldn't get name"} + + }/> {selectedPostFormat == "One" && ( item._id}