refactor(ui): web profile cards maxLength 4 -> 3 with flex grow
This commit is contained in:
committed by
Austin McKinley
parent
36a6eb2e62
commit
d6c41e5b33
@@ -247,7 +247,7 @@ export function ProfileGrid({
|
|||||||
const navigation = useNavigation<NavigationProp>()
|
const navigation = useNavigation<NavigationProp>()
|
||||||
const {gtMobile} = useBreakpoints()
|
const {gtMobile} = useBreakpoints()
|
||||||
const isLoading = isSuggestionsLoading || !moderationOpts
|
const isLoading = isSuggestionsLoading || !moderationOpts
|
||||||
const maxLength = gtMobile ? 4 : 6
|
const maxLength = gtMobile ? 3 : 6
|
||||||
|
|
||||||
const content = isLoading ? (
|
const content = isLoading ? (
|
||||||
Array(maxLength)
|
Array(maxLength)
|
||||||
@@ -281,7 +281,11 @@ export function ProfileGrid({
|
|||||||
style={[
|
style={[
|
||||||
a.flex_1,
|
a.flex_1,
|
||||||
gtMobile &&
|
gtMobile &&
|
||||||
web([a.flex_0, {width: `calc(50% - ${a.gap_md.gap / 2}px)`}]),
|
web([
|
||||||
|
a.flex_0,
|
||||||
|
a.flex_grow,
|
||||||
|
{width: `calc(30% - ${a.gap_md.gap / 2}px)`},
|
||||||
|
]),
|
||||||
]}>
|
]}>
|
||||||
{({hovered, pressed}) => (
|
{({hovered, pressed}) => (
|
||||||
<CardOuter
|
<CardOuter
|
||||||
|
|||||||
Reference in New Issue
Block a user