{isFetching &&
}
diff --git a/src/components/navigational/topBar/TopBar.tsx b/src/components/navigational/topBar/TopBar.tsx
index c5d86d19..1aea579d 100644
--- a/src/components/navigational/topBar/TopBar.tsx
+++ b/src/components/navigational/topBar/TopBar.tsx
@@ -16,14 +16,12 @@ export default function TopBar(props: Props) {
const { profile } = props;
const val = useScrollContext();
- const canUpdate = typeof window !== "undefined" && window.innerWidth < 768;
-
return (
{
if (inView) {
diff --git a/src/containers/search/UserSearchContainer.tsx b/src/containers/search/UserSearchContainer.tsx
index ebcac828..39300674 100644
--- a/src/containers/search/UserSearchContainer.tsx
+++ b/src/containers/search/UserSearchContainer.tsx
@@ -17,7 +17,7 @@ interface Props {
export default function UserSearchContainer(props: Props) {
const { query } = props;
const agent = useAgent();
- const { ref: observerRef, inView } = useInView();
+ const { ref: observerRef, inView } = useInView({ rootMargin: "100px" });
const {
status,
diff --git a/src/containers/settings/blockedUsersContainer/BlockedUsersContainer.tsx b/src/containers/settings/blockedUsersContainer/BlockedUsersContainer.tsx
index 756cb9da..7468bdc2 100644
--- a/src/containers/settings/blockedUsersContainer/BlockedUsersContainer.tsx
+++ b/src/containers/settings/blockedUsersContainer/BlockedUsersContainer.tsx
@@ -12,7 +12,7 @@ import LoadingSpinner from "@/components/status/loadingSpinner/LoadingSpinner";
export default function BlockedUsersContainer() {
const agent = useAgent();
- const { ref, inView } = useInView();
+ const { ref, inView } = useInView({ rootMargin: "100px" });
const {
status,
diff --git a/src/containers/settings/mutedUsersContainer/MutedUsersContainer.tsx b/src/containers/settings/mutedUsersContainer/MutedUsersContainer.tsx
index 0343edbc..c1f3f4cd 100644
--- a/src/containers/settings/mutedUsersContainer/MutedUsersContainer.tsx
+++ b/src/containers/settings/mutedUsersContainer/MutedUsersContainer.tsx
@@ -12,7 +12,7 @@ import LoadingSpinner from "@/components/status/loadingSpinner/LoadingSpinner";
export default function MutedUsersContainer() {
const agent = useAgent();
- const { ref, inView } = useInView();
+ const { ref, inView } = useInView({ rootMargin: "100px" });
const {
status,
diff --git a/src/containers/thread/LikedByContainer.tsx b/src/containers/thread/LikedByContainer.tsx
index 2c98b1a5..e3022936 100644
--- a/src/containers/thread/LikedByContainer.tsx
+++ b/src/containers/thread/LikedByContainer.tsx
@@ -19,7 +19,7 @@ export default function LikedByContainer(props: Props) {
const { handle, id } = props;
const agent = useAgent();
- const { ref, inView } = useInView();
+ const { ref, inView } = useInView({ rootMargin: "100px" });
const {
status,
diff --git a/src/containers/thread/RepostedByContainer.tsx b/src/containers/thread/RepostedByContainer.tsx
index 0688c9c6..bdffc24f 100644
--- a/src/containers/thread/RepostedByContainer.tsx
+++ b/src/containers/thread/RepostedByContainer.tsx
@@ -19,7 +19,7 @@ export default function RepostedByContainer(props: Props) {
const { handle, id } = props;
const agent = useAgent();
- const { ref, inView } = useInView();
+ const { ref, inView } = useInView({ rootMargin: "100px" });
const {
status,
diff --git a/src/lib/hooks/bsky/feed/useFeed.tsx b/src/lib/hooks/bsky/feed/useFeed.tsx
index eef676f1..c5fa96a2 100644
--- a/src/lib/hooks/bsky/feed/useFeed.tsx
+++ b/src/lib/hooks/bsky/feed/useFeed.tsx
@@ -8,7 +8,7 @@ export const useFeedKey = (feed: string) => [feed];
export default function useFeed(feed: string) {
const agent = useAgent();
- const { ref, inView } = useInView();
+ const { ref, inView } = useInView({ rootMargin: "800px" });
const {
status,
data: timeline,
diff --git a/src/lib/hooks/bsky/feed/useProfilePosts.tsx b/src/lib/hooks/bsky/feed/useProfilePosts.tsx
index 7671ac63..94c471bc 100644
--- a/src/lib/hooks/bsky/feed/useProfilePosts.tsx
+++ b/src/lib/hooks/bsky/feed/useProfilePosts.tsx
@@ -39,7 +39,7 @@ export default function useProfilePosts(props: Props) {
}
};
- const { ref, inView } = useInView();
+ const { ref, inView } = useInView({ rootMargin: "100px" });
const {
status,
data: userPosts,
diff --git a/src/lib/hooks/bsky/notification/useNotification.tsx b/src/lib/hooks/bsky/notification/useNotification.tsx
index 32d953c8..ba20d6de 100644
--- a/src/lib/hooks/bsky/notification/useNotification.tsx
+++ b/src/lib/hooks/bsky/notification/useNotification.tsx
@@ -1,7 +1,7 @@
import { useInView } from "react-intersection-observer";
import useAgent from "../useAgent";
import { useInfiniteQuery } from "@tanstack/react-query";
-import { useEffect, useMemo } from "react";
+import { useEffect } from "react";
import {
getNotifications,
updateSeenNotifications,
@@ -11,7 +11,7 @@ import { Notification } from "@atproto/api/dist/client/types/app/bsky/notificati
export default function useNotification() {
const agent = useAgent();
- const { ref, inView } = useInView();
+ const { ref, inView } = useInView({ rootMargin: "100px" });
const groupNotifications = (
notifications: Notification[]