Add profile view

This commit is contained in:
Paul Frazee 2022-07-21 19:55:04 -05:00
parent 29ed3d2ecf
commit cc8a170204
14 changed files with 319 additions and 27 deletions

View file

@ -30,7 +30,8 @@ export const PostThread = observer(function PostThread({
newView.setup().catch(err => console.error('Failed to fetch thread', err))
}, [uri, view?.params.uri, store])
// not yet setup
// loading
// =
if (
!view ||
(view.isLoading && !view.isRefreshing) ||
@ -44,6 +45,7 @@ export const PostThread = observer(function PostThread({
}
// error
// =
if (view.hasError) {
return (
<View>
@ -52,7 +54,8 @@ export const PostThread = observer(function PostThread({
)
}
// rendering
// loaded
// =
const posts = Array.from(flattenThread(view.thread))
const renderItem = ({item}: {item: PostThreadViewPostModel}) => (
<PostThreadItem item={item} onNavigateContent={onNavigateContent} />