The response was the expected data and not the actual axios response.
Thus, there was no "data" property and trying to use it could lead to errors like e.g. TypeErrors.
* 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"
The SWR response only has "isLoading" and "isValidating".
"isLoading" only indicates the initial load.
For every subsequent load, only "isValidating" gets set to true.
* Fix RequestManager initial infinite swr requests
Functions always returned "null" as the url, which causes SWR to not send the request
- useGetSourceLatestMangas
- useSourceSearch
- useSourceQuickSearch
* Use "skipRequest" for infinite SWR requests
Is easier to use then overwriting "getEndpoint" only for specific cases
* Request correct first page for infinite SWR requests
The following endpoints start at page 1
- popular source mangas
- latest source mangas
- source search
- source quick search
* Remove wrong parameter from source manga browse requests
No idea why I've added this in the first place
* Correctly request "latest" and "popular" source mangas
The "page" wasn't a param of the query but part of the endpoint
* Introduce "RequestManager"
* Use "RequestManager" - Simple replacements
- Get rid of all "util/client" imports
- replace old requests with new "RequestManager"
- remove "fetcher" from global SWR config
instead of using the SWR hooks by themselves, the "requestManager" is supposed to be used
* Use "RequestManager" - Do requests via SWR hooks
Use SWR hooks at places where it's easily usable
* Prevent trailing slashes in the "baseUrl"