mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-30 18:09:40 +05:00
chore: disable some linting errors
This commit is contained in:
parent
ff3753a951
commit
e441f3ffb7
3 changed files with 22 additions and 15 deletions
|
@ -29,26 +29,29 @@ export function BookmarksPage(props: { profile_id?: number }) {
|
|||
);
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
function useFetchReleases(listName: string) {
|
||||
let url: string;
|
||||
if (!preferenceStore.params.skipToCategory.enabled) {
|
||||
if (props.profile_id) {
|
||||
url = `${ENDPOINTS.user.bookmark}/all/${props.profile_id}/${BookmarksList[listName]}/0?sort=1`;
|
||||
if (token) {
|
||||
url += `&token=${token}`;
|
||||
}
|
||||
} else {
|
||||
if (token) {
|
||||
url = `${ENDPOINTS.user.bookmark}/all/${BookmarksList[listName]}/0?sort=1&token=${token}`;
|
||||
}
|
||||
}
|
||||
|
||||
const { data } = useSWR(url, fetcher);
|
||||
return [data];
|
||||
if (preferenceStore.params.skipToCategory.enabled) {
|
||||
return [null];
|
||||
}
|
||||
return [null];
|
||||
|
||||
if (props.profile_id) {
|
||||
url = `${ENDPOINTS.user.bookmark}/all/${props.profile_id}/${BookmarksList[listName]}/0?sort=1`;
|
||||
if (token) {
|
||||
url += `&token=${token}`;
|
||||
}
|
||||
} else {
|
||||
if (token) {
|
||||
url = `${ENDPOINTS.user.bookmark}/all/${BookmarksList[listName]}/0?sort=1&token=${token}`;
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
const { data } = useSWR(url, fetcher);
|
||||
return [data];
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue