pancy fants
This commit is contained in:
parent
a4fd3a3556
commit
b6633d6f25
15 changed files with 339 additions and 116 deletions
|
@ -2,6 +2,9 @@ import { useCallback } from 'react'
|
|||
import FeedView from '../feed/FeedView.tsx'
|
||||
import { PostsService } from '../model/posts/postsService.ts'
|
||||
import { useParams } from 'react-router'
|
||||
import SingleColumnLayout from '../layouts/SingleColumnLayout.tsx'
|
||||
import NavBar from '../components/NavBar.tsx'
|
||||
import { useFeedViewModel } from '../feed/FeedView.ts'
|
||||
|
||||
interface AuthorPageParams {
|
||||
postsService: PostsService
|
||||
|
@ -17,5 +20,11 @@ export default function AuthorPage({ postsService }: AuthorPageParams) {
|
|||
[postsService, username],
|
||||
)
|
||||
|
||||
return <FeedView loadMore={fetchPosts} />
|
||||
const { pages, loadNextPage } = useFeedViewModel(fetchPosts)
|
||||
|
||||
return (
|
||||
<SingleColumnLayout navbar={<NavBar />}>
|
||||
<FeedView pages={pages} onLoadMore={loadNextPage} />
|
||||
</SingleColumnLayout>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue