diff options
author | Hailey <me@haileyok.com> | 2024-03-19 07:56:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-19 09:56:28 -0500 |
commit | 4de8e8fa14774e753dea94a8fc01a5847c5dfcd2 (patch) | |
tree | 4057b6410c900839aae6642a5fe828419df63bc7 /src/screens | |
parent | 9c49b209ca9eda8e6fab0942f7046d335c955c1a (diff) | |
download | voidsky-4de8e8fa14774e753dea94a8fc01a5847c5dfcd2.tar.zst |
fix borders for labels tab (#3261)
* fix borders for labels tab * rm entire wrapping view
Diffstat (limited to 'src/screens')
-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> |