WIP full-bleed header
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {RefreshControl, TextStyle, View} from 'react-native'
|
import {RefreshControl, TextStyle, View} from 'react-native'
|
||||||
|
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||||
@@ -45,6 +46,7 @@ export type ScreenProps = NativeStackScreenProps<
|
|||||||
>
|
>
|
||||||
|
|
||||||
export function Subscriptions(_props: ScreenProps) {
|
export function Subscriptions(_props: ScreenProps) {
|
||||||
|
const insets = useSafeAreaInsets()
|
||||||
const purchases = usePurchases()
|
const purchases = usePurchases()
|
||||||
const {refetch} = usePurchasesApi()
|
const {refetch} = usePurchasesApi()
|
||||||
const {loading, restricted} = useNativeUserState()
|
const {loading, restricted} = useNativeUserState()
|
||||||
@@ -59,13 +61,14 @@ export function Subscriptions(_props: ScreenProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout.Screen>
|
<Layout.Screen noPaddingTop>
|
||||||
<Layout.Center>
|
<Layout.Center>
|
||||||
<GradientFill gradient={tokens.gradients.nordic} />
|
<GradientFill gradient={tokens.gradients.nordic} />
|
||||||
|
<View style={{height: insets.top}} />
|
||||||
<Layout.Header.Outer noBottomBorder>
|
<Layout.Header.Outer noBottomBorder>
|
||||||
<Layout.Header.BackButton />
|
<Layout.Header.BackButton />
|
||||||
<Layout.Header.Content>
|
<Layout.Header.Content>
|
||||||
<BlueskyPlusLogo width={100} fill='white' />
|
<BlueskyPlusLogo width={100} fill="white" />
|
||||||
</Layout.Header.Content>
|
</Layout.Header.Content>
|
||||||
<Layout.Header.Slot />
|
<Layout.Header.Slot />
|
||||||
</Layout.Header.Outer>
|
</Layout.Header.Outer>
|
||||||
@@ -116,9 +119,6 @@ function Core({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<Text style={[a.text_md, a.font_bold, t.atoms.text_contrast_medium]}>
|
|
||||||
<Trans>My subscriptions</Trans>
|
|
||||||
</Text>
|
|
||||||
{/*
|
{/*
|
||||||
<View style={[a.flex_row, a.align_center, a.gap_xs]}>
|
<View style={[a.flex_row, a.align_center, a.gap_xs]}>
|
||||||
<Mark width={30} gradient="nordic" />
|
<Mark width={30} gradient="nordic" />
|
||||||
@@ -138,6 +138,11 @@ function Core({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{isSubscribedToCore ? (
|
{isSubscribedToCore ? (
|
||||||
|
<>
|
||||||
|
<Text style={[a.text_md, a.font_bold, t.atoms.text_contrast_medium]}>
|
||||||
|
<Trans>My subscriptions</Trans>
|
||||||
|
</Text>
|
||||||
|
|
||||||
<View style={[a.pt_md, a.gap_lg]}>
|
<View style={[a.pt_md, a.gap_lg]}>
|
||||||
<View style={[a.gap_sm]}>
|
<View style={[a.gap_sm]}>
|
||||||
{coreSubscriptions.map(sub => (
|
{coreSubscriptions.map(sub => (
|
||||||
@@ -149,6 +154,7 @@ function Core({
|
|||||||
|
|
||||||
<InfoCards />
|
<InfoCards />
|
||||||
</View>
|
</View>
|
||||||
|
</>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
<View style={[a.pt_lg]}>
|
<View style={[a.pt_lg]}>
|
||||||
|
|||||||
Reference in New Issue
Block a user