fix: reshared posts should be shown in feed
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { ExternalLink } from "lucide-react";
|
||||
import { ExternalLink, Repeat2 } from "lucide-react";
|
||||
import type { Post } from "@/lib/social";
|
||||
import { displaySourceLabel } from "@/lib/source-reference";
|
||||
import { appendHighlight, hasHighlight } from "@/lib/text-highlight";
|
||||
@@ -46,6 +46,16 @@ export function PostCard({
|
||||
|
||||
return (
|
||||
<article className="rounded-xl bg-card ring-1 ring-foreground/10 p-5">
|
||||
{/* Reshare attribution — only on rows the feed owner reshared.
|
||||
The author block below still shows the original author; this
|
||||
strip just signals "this is on this feed because it was
|
||||
reshared," matching the Twitter/X retweet convention. */}
|
||||
{post.reshared_at ? (
|
||||
<div className="flex items-center gap-1.5 text-xs text-muted-foreground mb-3">
|
||||
<Repeat2 className="size-3.5" />
|
||||
<span>Reshared</span>
|
||||
</div>
|
||||
) : null}
|
||||
{/* Author header — identity on the left, overflow menu on the
|
||||
right. The menu trigger only renders when there are items to
|
||||
show (delete for owners, block/report for everyone else), so
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { ImageIcon } from "lucide-react";
|
||||
import { ImageIcon, Repeat2 } from "lucide-react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import type { Post, PostImage } from "@/lib/social";
|
||||
import { displaySourceLabel } from "@/lib/source-reference";
|
||||
@@ -75,6 +75,16 @@ export function PostScrollCard({
|
||||
id={`post-${post.id}`}
|
||||
className="rounded-2xl overflow-hidden bg-card ring-1 ring-foreground/10 scroll-mt-20 sm:scroll-mt-24"
|
||||
>
|
||||
{/* Reshare attribution — only on rows the feed owner reshared.
|
||||
The author block below still names the original author; this
|
||||
strip just signals why the post is in this feed. Matches the
|
||||
Twitter/X retweet convention. */}
|
||||
{post.reshared_at ? (
|
||||
<div className="flex items-center gap-1.5 px-4 pt-3 text-xs text-muted-foreground">
|
||||
<Repeat2 className="size-3.5" />
|
||||
<span>Reshared</span>
|
||||
</div>
|
||||
) : null}
|
||||
{/* Author header — identity on the left, three-dot overflow menu
|
||||
on the right (Delete for author, Block/Report for everyone
|
||||
else; PostCardMenu hides itself when there are no items). */}
|
||||
|
||||
Reference in New Issue
Block a user