Rm button

This commit is contained in:
Eric Bailey
2025-07-16 12:06:31 -05:00
parent cac4d535db
commit c657cd6cae
+21 -35
View File
@@ -12,10 +12,6 @@ import {useSession} from '#/state/session'
import {useShellLayout} from '#/state/shell/shell-layout' import {useShellLayout} from '#/state/shell/shell-layout'
import {Logo} from '#/view/icons/Logo' import {Logo} from '#/view/icons/Logo'
import {atoms as a, useTheme} from '#/alf' import {atoms as a, useTheme} from '#/alf'
import {
AgeAssuranceDismissibleHeaderButton,
useInternalState,
} from '#/components/ageAssurance/AgeAssuranceDismissibleHeaderButton'
import {ButtonIcon} from '#/components/Button' import {ButtonIcon} from '#/components/Button'
import {Hashtag_Stroke2_Corner0_Rounded as FeedsIcon} from '#/components/icons/Hashtag' import {Hashtag_Stroke2_Corner0_Rounded as FeedsIcon} from '#/components/icons/Hashtag'
import * as Layout from '#/components/Layout' import * as Layout from '#/components/Layout'
@@ -33,7 +29,6 @@ export function HomeHeaderLayoutMobile({
const headerMinimalShellTransform = useMinimalShellHeaderTransform() const headerMinimalShellTransform = useMinimalShellHeaderTransform()
const {hasSession} = useSession() const {hasSession} = useSession()
const playHaptic = useHaptics() const playHaptic = useHaptics()
const {visible: aaButtonVisible} = useInternalState()
return ( return (
<Animated.View <Animated.View
@@ -56,45 +51,36 @@ export function HomeHeaderLayoutMobile({
<Layout.Header.MenuButton /> <Layout.Header.MenuButton />
</Layout.Header.Slot> </Layout.Header.Slot>
<View style={[a.flex_1]} /> <View style={[a.flex_1, a.align_center]}>
<View style={[a.absolute, a.inset_0, a.align_center, a.justify_center]}>
<PressableScale <PressableScale
targetScale={0.9} targetScale={0.9}
onPress={() => { onPress={() => {
playHaptic('Light') playHaptic('Light')
emitSoftReset() emitSoftReset()
}} }}>
style={{top: -2}}>
<Logo width={30} /> <Logo width={30} />
</PressableScale> </PressableScale>
</View> </View>
{aaButtonVisible ? ( <Layout.Header.Slot>
<View style={{right: -4}}> {hasSession && (
<AgeAssuranceDismissibleHeaderButton /> <Link
</View> testID="viewHeaderHomeFeedPrefsBtn"
) : ( to={{screen: 'Feeds'}}
<Layout.Header.Slot> hitSlop={HITSLOP_10}
{hasSession && ( label={_(msg`View your feeds and explore more`)}
<Link size="small"
testID="viewHeaderHomeFeedPrefsBtn" variant="ghost"
to={{screen: 'Feeds'}} color="secondary"
hitSlop={HITSLOP_10} shape="square"
label={_(msg`View your feeds and explore more`)} style={[
size="small" a.justify_center,
variant="ghost" {marginRight: -Layout.BUTTON_VISUAL_ALIGNMENT_OFFSET},
color="secondary" ]}>
shape="square" <ButtonIcon icon={FeedsIcon} size="lg" />
style={[ </Link>
a.justify_center, )}
{marginRight: -Layout.BUTTON_VISUAL_ALIGNMENT_OFFSET}, </Layout.Header.Slot>
]}>
<ButtonIcon icon={FeedsIcon} size="lg" />
</Link>
)}
</Layout.Header.Slot>
)}
</Layout.Header.Outer> </Layout.Header.Outer>
{children} {children}
</Animated.View> </Animated.View>