fix starter pack card
This commit is contained in:
@@ -115,11 +115,10 @@ export const ProfileStarterPacks = React.forwardRef<
|
|||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
a.p_lg,
|
|
||||||
(isTabletOrDesktop || index !== 0) && a.border_t,
|
(isTabletOrDesktop || index !== 0) && a.border_t,
|
||||||
t.atoms.border_contrast_low,
|
t.atoms.border_contrast_low,
|
||||||
]}>
|
]}>
|
||||||
<StarterPackCard starterPack={item} />
|
<StarterPackCard starterPack={item} style={a.p_lg} />
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,19 +11,20 @@ import {getStarterPackOgCard} from '#/lib/strings/starter-pack'
|
|||||||
import {precacheResolvedUri} from '#/state/queries/resolve-uri'
|
import {precacheResolvedUri} from '#/state/queries/resolve-uri'
|
||||||
import {precacheStarterPack} from '#/state/queries/starter-packs'
|
import {precacheStarterPack} from '#/state/queries/starter-packs'
|
||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme, ViewStyleProp} from '#/alf'
|
||||||
import {StarterPack} from '#/components/icons/StarterPack'
|
import {StarterPack} from '#/components/icons/StarterPack'
|
||||||
import {Link as BaseLink, LinkProps as BaseLinkProps} from '#/components/Link'
|
import {Link as BaseLink, LinkProps as BaseLinkProps} from '#/components/Link'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
|
||||||
export function Default({
|
export function Default({
|
||||||
starterPack,
|
starterPack,
|
||||||
|
style,
|
||||||
}: {
|
}: {
|
||||||
starterPack?: AppBskyGraphDefs.StarterPackViewBasic
|
starterPack?: AppBskyGraphDefs.StarterPackViewBasic
|
||||||
}) {
|
} & ViewStyleProp) {
|
||||||
if (!starterPack) return null
|
if (!starterPack) return null
|
||||||
return (
|
return (
|
||||||
<Link starterPack={starterPack}>
|
<Link starterPack={starterPack} style={style}>
|
||||||
<Card starterPack={starterPack} />
|
<Card starterPack={starterPack} />
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
@@ -99,11 +100,12 @@ export function Card({
|
|||||||
export function Link({
|
export function Link({
|
||||||
starterPack,
|
starterPack,
|
||||||
children,
|
children,
|
||||||
|
style,
|
||||||
}: {
|
}: {
|
||||||
starterPack: AppBskyGraphDefs.StarterPackViewBasic
|
starterPack: AppBskyGraphDefs.StarterPackViewBasic
|
||||||
onPress?: () => void
|
onPress?: () => void
|
||||||
children: BaseLinkProps['children']
|
children: BaseLinkProps['children']
|
||||||
}) {
|
} & ViewStyleProp) {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
const {record} = starterPack
|
const {record} = starterPack
|
||||||
@@ -130,7 +132,7 @@ export function Link({
|
|||||||
)
|
)
|
||||||
precacheStarterPack(queryClient, starterPack)
|
precacheStarterPack(queryClient, starterPack)
|
||||||
}}
|
}}
|
||||||
style={[a.flex_col, a.align_start]}>
|
style={[a.flex_col, a.align_start, style]}>
|
||||||
{children}
|
{children}
|
||||||
</BaseLink>
|
</BaseLink>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user