Skip to content

Commit

Permalink
Revert "rm mini header"
Browse files Browse the repository at this point in the history
This reverts commit cfff349.
  • Loading branch information
mozzius committed Dec 18, 2024
1 parent 3262b83 commit 0ad4aab
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/screens/Profile/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -87,6 +90,8 @@ export {ProfileHeader}

const MinimalHeader = React.memo(function MinimalHeader({
onLayout,
profile,
hideBackButton,
}: {
onLayout: (e: LayoutChangeEvent) => void
profile: AppBskyActorDefs.ProfileViewDetailed
Expand Down Expand Up @@ -156,8 +161,19 @@ const MinimalHeader = React.memo(function MinimalHeader({
paddingTop: insets.top,
},
animatedStyle,
]}
/>
]}>
<Header.Outer>
{!hideBackButton && <Header.BackButton />}
<Header.Content align="left">
<Header.TitleText>
{sanitizeDisplayName(profile.displayName || profile.handle)}
</Header.TitleText>
<Header.SubtitleText>
{sanitizeHandle(profile.handle, '@')}
</Header.SubtitleText>
</Header.Content>
</Header.Outer>
</Animated.View>
)
})
MinimalHeader.displayName = 'MinimalHeader'
Expand Down

0 comments on commit 0ad4aab

Please sign in to comment.