Compare commits

...

1 Commits

Author SHA1 Message Date
Samuel Newman 41af7f0f4f fix starter pack card 2024-12-04 20:53:28 +00:00
2 changed files with 8 additions and 7 deletions
@@ -115,11 +115,10 @@ export const ProfileStarterPacks = React.forwardRef<
return (
<View
style={[
a.p_lg,
(isTabletOrDesktop || index !== 0) && a.border_t,
t.atoms.border_contrast_low,
]}>
<StarterPackCard starterPack={item} />
<StarterPackCard starterPack={item} style={a.p_lg} />
</View>
)
}
@@ -11,19 +11,20 @@ import {getStarterPackOgCard} from '#/lib/strings/starter-pack'
import {precacheResolvedUri} from '#/state/queries/resolve-uri'
import {precacheStarterPack} from '#/state/queries/starter-packs'
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 {Link as BaseLink, LinkProps as BaseLinkProps} from '#/components/Link'
import {Text} from '#/components/Typography'
export function Default({
starterPack,
style,
}: {
starterPack?: AppBskyGraphDefs.StarterPackViewBasic
}) {
} & ViewStyleProp) {
if (!starterPack) return null
return (
<Link starterPack={starterPack}>
<Link starterPack={starterPack} style={style}>
<Card starterPack={starterPack} />
</Link>
)
@@ -99,11 +100,12 @@ export function Card({
export function Link({
starterPack,
children,
style,
}: {
starterPack: AppBskyGraphDefs.StarterPackViewBasic
onPress?: () => void
children: BaseLinkProps['children']
}) {
} & ViewStyleProp) {
const {_} = useLingui()
const queryClient = useQueryClient()
const {record} = starterPack
@@ -130,7 +132,7 @@ export function Link({
)
precacheStarterPack(queryClient, starterPack)
}}
style={[a.flex_col, a.align_start]}>
style={[a.flex_col, a.align_start, style]}>
{children}
</BaseLink>
)