chore: disable some linting errors

This commit is contained in:
Kentai Radiquum 2024-11-21 23:07:10 +05:00
parent ff3753a951
commit e441f3ffb7
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
3 changed files with 22 additions and 15 deletions

View file

@ -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(() => {