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

@@ -24,6 +24,7 @@ import type { Post } from "../types/post";
import { downloadAttachment } from "./messageStream/utils/downloadFile";
import { mediaSaveKindFromType, useSaveToAlbumGuide } from "./SaveToAlbumGuide";
import { useToast } from "./Toast";
import { FavoriteButton } from "../favorites/FavoriteButton";
const MEDALS = ["🥇", "🥈", "🥉"];
const MAX_ITEMS = 5;
@@ -174,6 +175,7 @@ function PopularRankRow({
</div>
<div className="relative z-10 flex shrink-0 items-center gap-1">
<FavoriteButton resourceId={r.id} />
{r.isDownloadable ? (
<button
type="button"