- {props.images.map((item) => {
+ {props.images.map((item, index) => {
return (
-
+
= 98 && scrollPosition <= 99) {
setSize(size + 1);
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
useEffect(() => {
if (authState === "finished" && !token) {
router.push(`/login?redirect=/bookmarks/${props.slug}`);
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [authState, token]);
return (
diff --git a/app/pages/Collections.tsx b/app/pages/Collections.tsx
index 2b20ad4..ae3d480 100644
--- a/app/pages/Collections.tsx
+++ b/app/pages/Collections.tsx
@@ -35,6 +35,7 @@ export function CollectionsPage() {
if (userStore.state === "finished" && !userStore.token) {
router.push("/login?redirect=/collections");
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [userStore.state, userStore.token]);
return (
diff --git a/app/pages/CollectionsFull.tsx b/app/pages/CollectionsFull.tsx
index 486ca70..55ea2d1 100644
--- a/app/pages/CollectionsFull.tsx
+++ b/app/pages/CollectionsFull.tsx
@@ -76,6 +76,7 @@ export function CollectionsFullPage(props: {
if (scrollPosition >= 98 && scrollPosition <= 99) {
setSize(size + 1);
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
useEffect(() => {
@@ -86,6 +87,7 @@ export function CollectionsFullPage(props: {
) {
router.push(`/login?redirect=/collections/favorites`);
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [userStore.state, userStore.token]);
return (
diff --git a/app/pages/CreateCollection.tsx b/app/pages/CreateCollection.tsx
index 2bf3828..8300788 100644
--- a/app/pages/CreateCollection.tsx
+++ b/app/pages/CreateCollection.tsx
@@ -39,7 +39,6 @@ export const CreateCollectionPage = () => {
const [edit, setEdit] = useState(false);
- // const [imageData, setImageData] = useState(null);
const [imageUrl, setImageUrl] = useState(null);
const [tempImageUrl, setTempImageUrl] = useState(null);
const [isPrivate, setIsPrivate] = useState(false);
@@ -118,6 +117,7 @@ export const CreateCollectionPage = () => {
if (userStore.user) {
_checkMode();
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [userStore.user]);
const handleFileRead = (e, fileReader) => {
@@ -265,9 +265,11 @@ export const CreateCollectionPage = () => {
>
) : (
+ // eslint-disable-next-line @next/next/no-img-element
)}
@@ -457,6 +459,7 @@ export const ReleasesEditModal = (props: {
if (scrollPosition >= 95 && scrollPosition <= 96) {
setSize(size + 1);
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
function _addRelease(release: any) {
diff --git a/app/pages/Favorites.tsx b/app/pages/Favorites.tsx
index b2917cb..cb1e973 100644
--- a/app/pages/Favorites.tsx
+++ b/app/pages/Favorites.tsx
@@ -67,12 +67,14 @@ export function FavoritesPage() {
if (scrollPosition >= 98 && scrollPosition <= 99) {
setSize(size + 1);
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
useEffect(() => {
if (authState === "finished" && !token) {
router.push("/login?redirect=/favorites");
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [authState, token]);
return (
diff --git a/app/pages/History.tsx b/app/pages/History.tsx
index cab1eb3..333a895 100644
--- a/app/pages/History.tsx
+++ b/app/pages/History.tsx
@@ -59,12 +59,14 @@ export function HistoryPage() {
if (scrollPosition >= 98 && scrollPosition <= 99) {
setSize(size + 1);
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
useEffect(() => {
if (authState === "finished" && !token) {
router.push("/login?redirect=/history");
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [authState, token]);
return (
diff --git a/app/pages/IndexCategory.tsx b/app/pages/IndexCategory.tsx
index 456ed85..611af41 100644
--- a/app/pages/IndexCategory.tsx
+++ b/app/pages/IndexCategory.tsx
@@ -25,6 +25,7 @@ export function IndexCategoryPage(props) {
}
_loadInitialReleases();
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [token]);
useEffect(() => {
@@ -36,6 +37,7 @@ export function IndexCategoryPage(props) {
if (content) {
_loadNextReleasesPage();
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [page]);
const scrollPosition = useScrollPosition();
@@ -43,10 +45,9 @@ export function IndexCategoryPage(props) {
if (scrollPosition == 98) {
setPage(page + 1);
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
- // if (error) return
failed to load
;
-
return (
<>
{content && content.length > 0 ? (
diff --git a/app/pages/Login.tsx b/app/pages/Login.tsx
index 27507c2..c316708 100644
--- a/app/pages/Login.tsx
+++ b/app/pages/Login.tsx
@@ -49,6 +49,7 @@ export function LoginPage() {
if (userStore.user) {
router.push(`${redirect || "/"}`);
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [userStore.user]);
return (
diff --git a/app/pages/Profile.tsx b/app/pages/Profile.tsx
index a95b1bd..def785a 100644
--- a/app/pages/Profile.tsx
+++ b/app/pages/Profile.tsx
@@ -24,6 +24,7 @@ export const ProfilePage = (props: any) => {
setIsMyProfile(data.is_my_profile);
}
_getData();
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [authUser]);
if (!user) {
diff --git a/app/pages/Related.tsx b/app/pages/Related.tsx
index 2785576..a54b393 100644
--- a/app/pages/Related.tsx
+++ b/app/pages/Related.tsx
@@ -54,6 +54,7 @@ export function RelatedPage(props: {id: number|string, title: string}) {
if (scrollPosition >= 98 && scrollPosition <= 99) {
setSize(size + 1);
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
return (
diff --git a/app/pages/Search.tsx b/app/pages/Search.tsx
index 1ba6922..95d9182 100644
--- a/app/pages/Search.tsx
+++ b/app/pages/Search.tsx
@@ -85,6 +85,7 @@ export function SearchPage() {
if (scrollPosition >= 98 && scrollPosition <= 99) {
setSize(size + 1);
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
if (error) return
failed to load
;
diff --git a/app/pages/ViewCollection.tsx b/app/pages/ViewCollection.tsx
index 21df85c..d7b5872 100644
--- a/app/pages/ViewCollection.tsx
+++ b/app/pages/ViewCollection.tsx
@@ -86,6 +86,7 @@ export const ViewCollectionPage = (props: { id: number }) => {
if (scrollPosition >= 98 && scrollPosition <= 99) {
setSize(size + 1);
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [scrollPosition]);
return (