diff --git a/app/(home-pages)/reader/FeedLayout.tsx b/app/(home-pages)/reader/FeedLayout.tsx
new file mode 100644
index 00000000..53361ad0
--- /dev/null
+++ b/app/(home-pages)/reader/FeedLayout.tsx
@@ -0,0 +1,7 @@
+export const FeedLayout = (props: { children: React.ReactNode }) => {
+ return (
+
-
- {sortedPosts.map((p) => (
-
- ))}
- {/* Trigger element for loading more posts */}
-
+ {sortedPosts.map((p) => (
+
- {isValidating && allPosts.length > 0 && (
-
- Loading more posts...
-
- )}
-
-
-
-
+ ))}
+ {/* Trigger element for loading more posts */}
+
+ {isValidating && allPosts.length > 0 && (
+
+ Loading more posts...
+
+ )}
+ >
);
};
export const ReaderEmpty = () => {
return (
-
- Nothing to read yet…
- Subscribe to publications and find their posts here!
+
+ Subscribe to publications and find their latest posts here!
See what posts people are reading!
-
+
);
};
diff --git a/app/(home-pages)/reader/InteractionDrawers.tsx b/app/(home-pages)/reader/InteractionDrawers.tsx
deleted file mode 100644
index d9dd75bc..00000000
--- a/app/(home-pages)/reader/InteractionDrawers.tsx
+++ /dev/null
@@ -1,117 +0,0 @@
-"use client";
-import { ButtonPrimary } from "components/Buttons";
-import {
- SelectedPostListing,
- useSelectedPostListing,
-} from "src/useSelectedPostState";
-import { CommentsDrawerContent } from "app/lish/[did]/[publication]/[rkey]/Interactions/Comments";
-import { CloseTiny } from "components/Icons/CloseTiny";
-import { SpeedyLink } from "components/SpeedyLink";
-import { GoToArrow } from "components/Icons/GoToArrow";
-import { DotLoader } from "components/utils/DotLoader";
-import { ReaderMentionsContent } from "./ReaderMentionsContent";
-import { callRPC } from "app/api/rpc/client";
-import useSWR from "swr";
-import { getDocumentURL } from "app/lish/createPub/getPublicationURL";
-
-export const MobileInteractionPreviewDrawer = () => {
- let selectedPost = useSelectedPostListing((s) => s.selectedPostListing);
-
- return (
-
- );
-};
-
-export const DesktopInteractionPreviewDrawer = () => {
- let selectedPost = useSelectedPostListing((s) => s.selectedPostListing);
-
- return (
-
- );
-};
-
-const PreviewDrawerContent = (props: {
- selectedPost: SelectedPostListing | null;
-}) => {
- const documentUri = props.selectedPost?.document_uri || null;
- const drawer = props.selectedPost?.drawer || null;
-
- const { data, isLoading } = useSWR(
- documentUri ? ["get_document_interactions", documentUri] : null,
- async () => {
- const res = await callRPC("get_document_interactions", {
- document_uri: documentUri!,
- });
- return res;
- },
- { keepPreviousData: false },
- );
-
- if (!props.selectedPost || !props.selectedPost.document)
- return (
-
- Click a post's comments or mentions to preview them here!
-
- );
-
- const postUrl = getDocumentURL(
- props.selectedPost.document,
- props.selectedPost.document_uri,
- props.selectedPost.publication,
- );
-
- const drawerTitle =
- drawer === "quotes"
- ? `Mentions of ${props.selectedPost.document.title}`
- : `Comments for ${props.selectedPost.document.title}`;
-
- return (
- <>
-
-
-
{drawerTitle}
-
- useSelectedPostListing.getState().setSelectedPostListing(null)
- }
- >
-
-
-
-
-
- See Full Post
-
-
-
-
- {isLoading ? (
-
- loading
-
-
- ) : drawer === "quotes" ? (
-
-
-
- ) : (
-
- )}
- >
- );
-};
diff --git a/app/(home-pages)/reader/NewContent.tsx b/app/(home-pages)/reader/NewContent.tsx
index 0c8d477b..74f383f7 100644
--- a/app/(home-pages)/reader/NewContent.tsx
+++ b/app/(home-pages)/reader/NewContent.tsx
@@ -7,10 +7,6 @@ import useSWRInfinite from "swr/infinite";
import { getNewFeed } from "./getNewFeed";
import { useEffect, useRef } from "react";
import { PostListing } from "components/PostListing";
-import {
- DesktopInteractionPreviewDrawer,
- MobileInteractionPreviewDrawer,
-} from "./InteractionDrawers";
import { useSelectedPostListing } from "src/useSelectedPostState";
export const NewContent = (props: {
@@ -70,28 +66,24 @@ export const NewContent = (props: {
}
return (
-
-
- {allPosts.map((p) => (
-
- ))}
-
+ {allPosts.map((p) => (
+
- {isValidating && allPosts.length > 0 && (
-
- Loading more posts...
-
- )}
-
-
-
-
+ ))}
+
+ {isValidating && allPosts.length > 0 && (
+
+ Loading more posts...
+
+ )}
+ >
);
};
diff --git a/app/(home-pages)/reader/new/page.tsx b/app/(home-pages)/reader/new/page.tsx
index 002710d0..3edde47c 100644
--- a/app/(home-pages)/reader/new/page.tsx
+++ b/app/(home-pages)/reader/new/page.tsx
@@ -3,6 +3,7 @@ import { DashboardPageLayout } from "components/PageLayouts/DashboardPageLayout"
import { getNewFeed } from "../getNewFeed";
import { NewContent } from "../NewContent";
import { FeedSkeleton } from "../FeedSkeleton";
+import { FeedLayout } from "../FeedLayout";
export default function NewPage() {
return (
@@ -12,7 +13,9 @@ export default function NewPage() {
showHeader={false}
>
}>
-
+
+
+
);
diff --git a/app/(home-pages)/reader/page.tsx b/app/(home-pages)/reader/page.tsx
index ea4c247a..207c0d76 100644
--- a/app/(home-pages)/reader/page.tsx
+++ b/app/(home-pages)/reader/page.tsx
@@ -5,6 +5,7 @@ import { DashboardPageLayout } from "components/PageLayouts/DashboardPageLayout"
import { getReaderFeed } from "./getReaderFeed";
import { InboxContent } from "./InboxContent";
import { FeedSkeleton } from "./FeedSkeleton";
+import { FeedLayout } from "./FeedLayout";
export default async function ReaderPage(props: {
searchParams: Promise<{ tab?: string }>;
@@ -22,7 +23,9 @@ export default async function ReaderPage(props: {
showHeader={false}
>
}>
-
+
+
+
);
diff --git a/app/(home-pages)/reader/trending/page.tsx b/app/(home-pages)/reader/trending/page.tsx
index cf1c8fdd..b87f1216 100644
--- a/app/(home-pages)/reader/trending/page.tsx
+++ b/app/(home-pages)/reader/trending/page.tsx
@@ -3,6 +3,7 @@ import { DashboardPageLayout } from "components/PageLayouts/DashboardPageLayout"
import { getHotFeed } from "../getHotFeed";
import { GlobalContent } from "../GlobalContent";
import { FeedSkeleton } from "../FeedSkeleton";
+import { FeedLayout } from "../FeedLayout";
export default function ReaderTrendingPage() {
return (
@@ -12,7 +13,9 @@ export default function ReaderTrendingPage() {
showHeader={false}
>
}>
-
+
+
+
);
diff --git a/components/ActionBar/DesktopNavigation.tsx b/components/ActionBar/DesktopNavigation.tsx
index f8a63c7c..3e502d79 100644
--- a/components/ActionBar/DesktopNavigation.tsx
+++ b/components/ActionBar/DesktopNavigation.tsx
@@ -98,6 +98,7 @@ export const NavigationContent = (props: NavigationProps) => {
)}
{onWriterPage &&
}
+
@@ -119,7 +120,7 @@ export function NotificationButton() {
)
}
active={active}
- className={unreads ? "text-accent-contrast! font-bold" : ""}
+ className={unreads ? "text-accent-contrast! font-bold w-full!" : "w-full"}
/>
);
}
diff --git a/components/ActionBar/Publications.tsx b/components/ActionBar/Publications.tsx
index ff01a462..b542d670 100644
--- a/components/ActionBar/Publications.tsx
+++ b/components/ActionBar/Publications.tsx
@@ -12,11 +12,7 @@ import {
type NormalizedPublication,
} from "src/utils/normalizeRecords";
import { SpeedyLink } from "components/SpeedyLink";
-import { PublishSmall } from "components/Icons/PublishSmall";
-import { Popover } from "components/Popover";
import { ButtonPrimary, ButtonSecondary } from "components/Buttons";
-import { useIsInitialRender, useIsMobile } from "src/hooks/isMobile";
-import { useState } from "react";
import { LooseLeafSmall } from "components/Icons/LooseleafSmall";
import { LoginModal } from "components/LoginButton";
import useSWR from "swr";
diff --git a/components/PostListing.tsx b/components/PostListing.tsx
index 2631c473..648ddcad 100644
--- a/components/PostListing.tsx
+++ b/components/PostListing.tsx
@@ -138,10 +138,11 @@ export const PostListing = (props: Post & { selected?: boolean }) => {
{postRecord.title}
)}
-
-
- {postRecord.description || getFirstParagraph(postRecord)}
-
+ {postRecord.description && postRecord.description !== "" && (
+
+ {postRecord.description || getFirstParagraph(postRecord)}
+
+ )}
{props.publication && pubRecord && (