loading quotes
@@ -68,38 +73,32 @@ function QuotesContent(props: { posts: PostView[]; postUri: string }) {
return (
- {posts.map((post) => (
-
+ {posts.map((post, index) => (
+ <>
+
+ {posts.length !== index + 1 && (
+
+ )}
+ >
))}
);
}
-function QuotePost(props: {
- post: PostView;
- quotesUri: string;
-}) {
+function QuotePost(props: { post: PostView; quotesUri: string }) {
const { post, quotesUri } = props;
const parent = { type: "quotes" as const, uri: quotesUri };
return (
-
openPage(parent, { type: "thread", uri: post.uri })}
- >
- e.stopPropagation()}
- onEmbedClick={(e) => e.stopPropagation()}
- />
-
+
);
}
diff --git a/app/lish/[did]/[publication]/[rkey]/BskyPostContent.tsx b/app/lish/[did]/[publication]/[rkey]/BskyPostContent.tsx
index 579a9255..d8145d12 100644
--- a/app/lish/[did]/[publication]/[rkey]/BskyPostContent.tsx
+++ b/app/lish/[did]/[publication]/[rkey]/BskyPostContent.tsx
@@ -1,8 +1,6 @@
"use client";
import { AppBskyFeedDefs, AppBskyFeedPost } from "@atproto/api";
-import {
- BlueskyEmbed,
-} from "components/Blocks/BlueskyPostBlock/BlueskyEmbed";
+import { BlueskyEmbed } from "components/Blocks/BlueskyPostBlock/BlueskyEmbed";
import { BlueskyRichText } from "components/Blocks/BlueskyPostBlock/BlueskyRichText";
import { BlueskyTiny } from "components/Icons/BlueskyTiny";
import { CommentTiny } from "components/Icons/CommentTiny";
@@ -10,154 +8,286 @@ import { QuoteTiny } from "components/Icons/QuoteTiny";
import { Separator } from "components/Layout";
import { useLocalizedDate } from "src/hooks/useLocalizedDate";
import { useHasPageLoaded } from "components/InitialPageLoadProvider";
-import { OpenPage } from "./PostPages";
+import { OpenPage, openPage } from "./PostPages";
import { ThreadLink, QuotesLink } from "./PostLinks";
+import { BlueskyLinkTiny } from "components/Icons/BlueskyLinkTiny";
+import { Avatar } from "components/Avatar";
+import { timeAgo } from "src/utils/timeAgo";
+import { ProfilePopover } from "components/ProfilePopover";
type PostView = AppBskyFeedDefs.PostView;
export function BskyPostContent(props: {
post: PostView;
- parent?: OpenPage;
- linksEnabled?: boolean;
- avatarSize?: "sm" | "md";
+ parent: OpenPage | undefined;
+ avatarSize?: "tiny" | "small" | "medium" | "large" | "giant";
+ className?: string;
showEmbed?: boolean;
+ compactEmbed?: boolean;
showBlueskyLink?: boolean;
- onEmbedClick?: (e: React.MouseEvent) => void;
- onLinkClick?: (e: React.MouseEvent) => void;
+ quoteEnabled?: boolean;
+ replyEnabled?: boolean;
+ replyOnClick?: (e: React.MouseEvent) => void;
}) {
const {
post,
parent,
- linksEnabled = true,
- avatarSize = "md",
+ avatarSize = "medium",
showEmbed = true,
+ compactEmbed = false,
showBlueskyLink = true,
- onEmbedClick,
- onLinkClick,
+ quoteEnabled,
+ replyEnabled,
+ replyOnClick,
} = props;
const record = post.record as AppBskyFeedPost.Record;
const postId = post.uri.split("/")[4];
const url = `https://bsky.app/profile/${post.author.handle}/post/${postId}`;
- const avatarClass = avatarSize === "sm" ? "w-8 h-8" : "w-10 h-10";
-
return (
- <>
-
- {post.author.avatar ? (
-
![]()
+