feat: add favorites state and buttons

This commit is contained in:
TerryM
2026-06-02 00:36:11 +08:00
parent 43700d9fdc
commit 337e8f7e67
16 changed files with 491 additions and 93 deletions

View File

@@ -8,6 +8,7 @@ import { AlbumBubble } from "./bubbles/AlbumBubble";
import { VideoBubble } from "./bubbles/VideoBubble";
import { LinkPreviewCard } from "./LinkPreviewCard";
import { formatDateTime } from "./utils/formatTime";
import { FavoriteButton } from "../../favorites/FavoriteButton";
type BubbleComponent = ComponentType<{ post: Post }>;
@@ -53,6 +54,11 @@ export function MessageBubble({
isVisual ? "p-0" : "px-4 py-3"
}`}
>
<FavoriteButton
resourceId={post.id}
size="sm"
className="absolute right-3 top-3 z-20 shadow-lg shadow-black/30"
/>
<Bubble post={post} />
{post.linkPreview ? (
<div className={isVisual ? "px-4 pt-3" : "mt-3"}>