Skip to content

Commit

Permalink
make useMyThreads optional
Browse files Browse the repository at this point in the history
Co-authored-by: Theophile Sandoz <theophile.sandoz@gmail.com>
  • Loading branch information
traumschule and thesan committed Feb 25, 2023
1 parent 3832ca5 commit 7444986
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ui/src/app/pages/Forum/components/ForumTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { useMyThreads, UseMyThreadsProps } from '@/forum/hooks/useMyThreads'
const order = { orderKey: 'updatedAt', isDescending: true }

export const ForumTabs = () => {
const { pageCount } = useMyThreads({ page: 0, threadsPerPage: 1000, order } as UseMyThreadsProps)
const myThreadsCount = pageCount && pageCount > 0 ? pageCount : undefined
const { totalCount = 0 } = useMyThreads()
const myThreadsCount = totalCount || undefined
const tabs = usePageTabs([
['Forum', ForumRoutes.forum],
['My Threads', ForumRoutes.myThreads, myThreadsCount],
Expand Down

0 comments on commit 7444986

Please sign in to comment.