feat: comic issue, comic series and library page updates#88
feat: comic issue, comic series and library page updates#88
Conversation
|
|
||
| if (!me) return null | ||
|
|
||
| const favoriteComics = await fetchFavoriteComics({ |
There was a problem hiding this comment.
I would like to avoid this approach.
We don't need to fetch favorite comics if we are on creators tab and vice versa.
Also you are missing fetch for owned comics here/owned issues, right? Or that's done with the purpose to keep it as it was?
There was a problem hiding this comment.
that fetch is outside of the wrapper as content of that tab changes (depending on route, ergo dreader.app/library and dreader.app/library/[slug])
There was a problem hiding this comment.
I will implement a tab listener together with React Query that will enable fetching only if the pressed tab is selected.
| <LibraryTabs comicIssue={comicIssue} ownedIssues={ownedIssues} /> | ||
| </BaseLayout> | ||
| <LibraryTabsWrapper userId={me.id}> | ||
| <TabsContent className='mt-0 pt-4 border-t border-grey-300' value='owned'> |
There was a problem hiding this comment.
can we move tabs content for owned issues inside LibraryTabsWrapper?
There was a problem hiding this comment.
yes, i would like to do that together with infinite scroll + fetch per tab clicked ticket since that one will kind of decide on final structure.
| {comicIssue && ownedIssues.length ? ( | ||
| <OwnedIssuesContent comicIssue={comicIssue} ownedIssues={ownedIssues} /> | ||
| ) : ( | ||
| <EmptyLibrarySection |
There was a problem hiding this comment.
In my opinion, we should move Empty section inside OwnedIssuesContent for this use case.
We could check ownedIssues.length over there and display empty section accordingly.
Thoughts?
| </BaseLayout> | ||
| <LibraryTabsWrapper userId={me.id}> | ||
| <TabsContent className='mt-0 pt-4 border-t border-grey-300' value='owned'> | ||
| {ownedComics.length ? ( |
There was a problem hiding this comment.
is it possible to move this logic inside LibraryTabsWrapper?
| {ownedComics.length ? ( | ||
| <ComicsByAlphabet comics={ownedComics} ComicCard={OwnedComicCard} /> | ||
| ) : ( | ||
| <EmptyLibrarySection |
There was a problem hiding this comment.
same comment as above for owned issues.length
No description provided.