FeedCard & ListCard cleanups (#4644)

* Extract ListCard from FeedCard

* Export FeedCard.Action and optionally include in ListCard

* Remove list dual usage from most of FeedCard

* Update usages of FeedCard and ListCard

* Add back list purpose logic

* Make Action comp easier to use, clarify list purpose

* Rename Action to SaveButton
This commit is contained in:
Eric Bailey 2024-06-28 08:27:54 -05:00 committed by GitHub
parent 58a97db5b8
commit 1a037d3542
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 198 additions and 97 deletions

View file

@ -163,7 +163,7 @@ export const ProfileFeedgens = React.forwardRef<
a.px_lg,
a.py_lg,
]}>
<FeedCard.Default type="feed" view={item} />
<FeedCard.Default view={item} />
</View>
)
}

View file

@ -18,7 +18,7 @@ import {useAnalytics} from 'lib/analytics/analytics'
import {FeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
import {EmptyState} from 'view/com/util/EmptyState'
import {atoms as a, useTheme} from '#/alf'
import * as FeedCard from '#/components/FeedCard'
import * as ListCard from '#/components/ListCard'
import {ErrorMessage} from '../util/error/ErrorMessage'
import {List, ListRef} from '../util/List'
import {LoadMoreRetryBtn} from '../util/LoadMoreRetryBtn'
@ -172,7 +172,7 @@ export const ProfileLists = React.forwardRef<SectionRef, ProfileListsProps>(
a.px_lg,
a.py_lg,
]}>
<FeedCard.Default type="list" view={item} />
<ListCard.Default view={item} />
</View>
)
},