From 26b286f82cb8650c455316b40a446efb073baa7d Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Fri, 13 Feb 2026 20:51:33 +0400 Subject: [PATCH] remove publications and fix external url logic --- app/(home-pages)/reader/layout.tsx | 8 +------- components/PostListing.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/(home-pages)/reader/layout.tsx b/app/(home-pages)/reader/layout.tsx index 29e6695c..4af166d9 100644 --- a/app/(home-pages)/reader/layout.tsx +++ b/app/(home-pages)/reader/layout.tsx @@ -66,13 +66,7 @@ export default function ReaderLayout({ ))} -
- {(pathname === "/reader" || pathname === "/") && ( -
- Publications -
- )} -
+
{children}
diff --git a/components/PostListing.tsx b/components/PostListing.tsx index cf713d56..089ba130 100644 --- a/components/PostListing.tsx +++ b/components/PostListing.tsx @@ -8,6 +8,7 @@ import type { NormalizedDocument, NormalizedPublication, } from "src/utils/normalizeRecords"; +import { hasLeafletContent } from "lexicons/src/normalize"; import type { Post } from "app/(home-pages)/reader/getReaderFeed"; import Link from "next/link"; @@ -140,6 +141,7 @@ export const PostListing = (props: Post) => { href={props.publication.href} pubRecord={pubRecord} uri={props.publication.uri} + postRecord={postRecord} /> )}
@@ -172,9 +174,9 @@ const PubInfo = (props: { href: string; pubRecord: NormalizedPublication; uri: string; + postRecord: NormalizedDocument; }) => { - let isLeaflet = - props.pubRecord.theme?.$type === "pub.leaflet.publication#theme"; + let isLeaflet = hasLeafletContent(props.postRecord); let cleanUrl = props.pubRecord.url ?.replace(/^https?:\/\//, "") .replace(/^www\./, ""); -- 2.51.2