From 0ad4aab8787c2f49e97978353e3caf822dc5e985 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 11 Dec 2024 23:01:55 +0000 Subject: [PATCH] Revert "rm mini header" This reverts commit cfff3498adc50781923a2d6d43e3c0daabce4180. --- src/screens/Profile/Header/index.tsx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/screens/Profile/Header/index.tsx b/src/screens/Profile/Header/index.tsx index 7e4b9bb313..39daf895b7 100644 --- a/src/screens/Profile/Header/index.tsx +++ b/src/screens/Profile/Header/index.tsx @@ -15,11 +15,14 @@ import { } from '@atproto/api' import {useIsFocused} from '@react-navigation/native' +import {sanitizeDisplayName} from '#/lib/strings/display-names' +import {sanitizeHandle} from '#/lib/strings/handles' import {isNative} from '#/platform/detection' import {useSetLightStatusBar} from '#/state/shell/light-status-bar' import {usePagerHeaderContext} from '#/view/com/pager/PagerHeaderContext' import {LoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder' import {atoms as a, useTheme} from '#/alf' +import {Header} from '#/components/Layout' import {ProfileHeaderLabeler} from './ProfileHeaderLabeler' import {ProfileHeaderStandard} from './ProfileHeaderStandard' @@ -87,6 +90,8 @@ export {ProfileHeader} const MinimalHeader = React.memo(function MinimalHeader({ onLayout, + profile, + hideBackButton, }: { onLayout: (e: LayoutChangeEvent) => void profile: AppBskyActorDefs.ProfileViewDetailed @@ -156,8 +161,19 @@ const MinimalHeader = React.memo(function MinimalHeader({ paddingTop: insets.top, }, animatedStyle, - ]} - /> + ]}> + + {!hideBackButton && } + + + {sanitizeDisplayName(profile.displayName || profile.handle)} + + + {sanitizeHandle(profile.handle, '@')} + + + + ) }) MinimalHeader.displayName = 'MinimalHeader'