Feature/refactor source mangas screen (#314)

* Refactor "SourceMangas"

* Refactor "SourceMangas" - Show loading placeholder on filter reset or submit

Due to the url being the same for all "filter requests" the loading state doesn't get changed by SWR.
Instead, only the "isValidating" state gets updated.

* Refactor "SourceMangas" - Update routing

* Refactor "SourceMangas" - Prevent duplicated mangas in grid

There is a possibility that the "latest" endpoint returns the same manga on different pages

* Always set the toolbar content on the manga page

"setAction" wasn't called on the manga page, thus, in case the previous page didn't unset the action, it never got unset

* Rename source content type "Browse" to "Popular"
This commit is contained in:
schroda
2023-05-28 12:16:06 +02:00
committed by GitHub
parent 1480507c35
commit 46a7ff6e3b
8 changed files with 318 additions and 248 deletions

View File

@@ -71,11 +71,8 @@ const App: React.FC = () => (
{/* Manga Routes */}
<Route path="/sources/:sourceId/popular/">
<SourceMangas popular />
</Route>
<Route path="/sources/:sourceId/latest/">
<SourceMangas popular={false} />
<Route exact path="/sources/:sourceId">
<SourceMangas />
</Route>
<Route path="/sources/:sourceId/configure/">
<SourceConfigure />