diff --git a/src/app/dashboard/user/[handle]/(post)/post/[id]/page.tsx b/src/app/dashboard/user/[handle]/(post)/post/[id]/page.tsx index 5e59b690..85c57268 100644 --- a/src/app/dashboard/user/[handle]/(post)/post/[id]/page.tsx +++ b/src/app/dashboard/user/[handle]/(post)/post/[id]/page.tsx @@ -13,14 +13,10 @@ interface Props { id: string; handle: string; }; - searchParams: { - query?: string; - }; } export default async function Page(props: Props) { const { id, handle } = props.params; - const { query } = props.searchParams; return ( <> @@ -29,11 +25,7 @@ export default async function Page(props: Props) { Post - + ); } diff --git a/src/components/contentDisplay/feedPost/FeedPost.tsx b/src/components/contentDisplay/feedPost/FeedPost.tsx index d11e7e72..c094ca61 100644 --- a/src/components/contentDisplay/feedPost/FeedPost.tsx +++ b/src/components/contentDisplay/feedPost/FeedPost.tsx @@ -134,12 +134,8 @@ export default function FeedPost(props: Props) { /> )} - {!hidden && ( - <> - {post.post.embed && ( - - )} - + {!hidden && post.post.embed && ( + )}
diff --git a/src/components/contentDisplay/notification/NotificationItem.tsx b/src/components/contentDisplay/notification/NotificationItem.tsx index 8fd38eef..76039eba 100644 --- a/src/components/contentDisplay/notification/NotificationItem.tsx +++ b/src/components/contentDisplay/notification/NotificationItem.tsx @@ -90,14 +90,16 @@ const NotificationItem = memo(function NotificationItem(props: Props) { {author.displayName || author.handle}{" "} )} - + {getNotificationLabel(reason)}  ยท {getRelativeTime(indexedAt)} {subjectUri && ( - +
+ +
)}
diff --git a/src/components/contentDisplay/threadPost/ThreadPost.tsx b/src/components/contentDisplay/threadPost/ThreadPost.tsx index f047af7b..4605bd4f 100644 --- a/src/components/contentDisplay/threadPost/ThreadPost.tsx +++ b/src/components/contentDisplay/threadPost/ThreadPost.tsx @@ -81,9 +81,7 @@ export default function ThreadPost(props: Props) { /> )} - {!hidden && ( - <>{post.embed && } - )} + {!hidden && post.embed && }
{getFormattedDate(post.indexedAt)}
diff --git a/src/containers/thread/PostThreadContainer.tsx b/src/containers/thread/PostThreadContainer.tsx index a4ac7d24..fe5fc79c 100644 --- a/src/containers/thread/PostThreadContainer.tsx +++ b/src/containers/thread/PostThreadContainer.tsx @@ -17,7 +17,7 @@ import usePreferences from "@/lib/hooks/bsky/actor/usePreferences"; import { getPostThread } from "@/lib/api/bsky/feed"; import { sortThread } from "@/lib/utils/feed"; import { useQuery } from "@tanstack/react-query"; -import { useRouter } from "next/navigation"; +import { useRouter, useSearchParams } from "next/navigation"; import { MAX_REPLY_CONTAINERS } from "@/lib/consts/thread"; import ThreadActionsContainer from "./ThreadActionsContainer"; import { replyIncludes } from "@/lib/utils/text"; @@ -28,11 +28,12 @@ import { getAgentFromClient } from "@/lib/api/bsky/agent"; interface Props { id: string; handle: string; - repliesTextFilter: string; } export default function PostThreadContainer(props: Props) { - const { id, handle, repliesTextFilter } = props; + const { id, handle } = props; + const searchParams = useSearchParams(); + const search = searchParams.get("query") ?? ""; const [maxReplies, setMaxReplies] = useState(MAX_REPLY_CONTAINERS); const router = useRouter(); const { data: session } = useSession(); @@ -57,13 +58,13 @@ export default function PostThreadContainer(props: Props) { thread: thread, }); - const [textSearch, setTextSearch] = useState(repliesTextFilter); + const [textSearch, setTextSearch] = useState(search); const [filteredReplies, setFilteredReplies] = useState(0); // Update textFilter and filteredReplies useEffect(() => { - setTextSearch(repliesTextFilter); - }, [repliesTextFilter]); + setTextSearch(search); + }, [search]); useEffect(() => { setFilteredReplies(