diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-03-19 19:51:35 +0000 |
---|---|---|
committer | Samuel Newman <mozzius@protonmail.com> | 2024-03-19 19:51:35 +0000 |
commit | 4794ab6b9a39d06bb0d1b7c64a315e4ac5e3336a (patch) | |
tree | 743b94dff5a4a3b4b2304c53b984b8a3dc67aaa2 /src/screens/Profile/Sections/Labels.tsx | |
parent | a1c4f19731878f7026d398d28e475bbeb7de824a (diff) | |
parent | 5621c8042510c86f6c4fa63b5c5ce9fc02b0bf8e (diff) | |
download | voidsky-4794ab6b9a39d06bb0d1b7c64a315e4ac5e3336a.tar.zst |
Merge remote-tracking branch 'origin/main' into samuel/alf-login
Diffstat (limited to 'src/screens/Profile/Sections/Labels.tsx')
-rw-r--r-- | src/screens/Profile/Sections/Labels.tsx | 60 |
1 files changed, 21 insertions, 39 deletions
diff --git a/src/screens/Profile/Sections/Labels.tsx b/src/screens/Profile/Sections/Labels.tsx index 07beb9529..08db4a861 100644 --- a/src/screens/Profile/Sections/Labels.tsx +++ b/src/screens/Profile/Sections/Labels.tsx @@ -48,7 +48,6 @@ export const ProfileLabelsSection = React.forwardRef< }, ref, ) { - const t = useTheme() const {_} = useLingui() const {height: minHeight} = useSafeAreaFrame() @@ -66,37 +65,26 @@ export const ProfileLabelsSection = React.forwardRef< })) return ( - <CenteredView> - <View - style={[ - a.border_l, - a.border_r, - a.border_t, - t.atoms.border_contrast_low, - { - minHeight, - }, - ]}> - {isLabelerLoading ? ( - <View style={[a.w_full, a.align_center]}> - <Loader size="xl" /> - </View> - ) : labelerError || !labelerInfo ? ( - <ErrorState - error={ - labelerError?.toString() || - _(msg`Something went wrong, please try again.`) - } - /> - ) : ( - <ProfileLabelsSectionInner - moderationOpts={moderationOpts} - labelerInfo={labelerInfo} - scrollElRef={scrollElRef} - headerHeight={headerHeight} - /> - )} - </View> + <CenteredView style={{flex: 1, minHeight}} sideBorders> + {isLabelerLoading ? ( + <View style={[a.w_full, a.align_center]}> + <Loader size="xl" /> + </View> + ) : labelerError || !labelerInfo ? ( + <ErrorState + error={ + labelerError?.toString() || + _(msg`Something went wrong, please try again.`) + } + /> + ) : ( + <ProfileLabelsSectionInner + moderationOpts={moderationOpts} + labelerInfo={labelerInfo} + scrollElRef={scrollElRef} + headerHeight={headerHeight} + /> + )} </CenteredView> ) }) @@ -149,13 +137,7 @@ export function ProfileLabelsSectionInner({ }} contentOffset={{x: 0, y: headerHeight * -1}} onScroll={scrollHandler}> - <View - style={[ - a.pt_xl, - a.px_lg, - isNative && a.border_t, - t.atoms.border_contrast_low, - ]}> + <View style={[a.pt_xl, a.px_lg, a.border_t, t.atoms.border_contrast_low]}> <View> <Text style={[t.atoms.text_contrast_high, a.leading_snug, a.text_sm]}> <Trans> |