From 27577635be6dcf9acb03acd79bfebbdd80e4431b Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Sun, 20 Oct 2024 16:56:26 +0800 Subject: [PATCH] feat: integrate Boost modal into feed actions --- apps/renderer/src/hooks/biz/useFeedActions.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/renderer/src/hooks/biz/useFeedActions.tsx b/apps/renderer/src/hooks/biz/useFeedActions.tsx index aae6ba9f1..220166cad 100644 --- a/apps/renderer/src/hooks/biz/useFeedActions.tsx +++ b/apps/renderer/src/hooks/biz/useFeedActions.tsx @@ -9,6 +9,7 @@ import type { FeedViewType } from "~/lib/enum" import type { NativeMenuItem, NullableNativeMenuItem } from "~/lib/native-menu" import { UrlBuilder } from "~/lib/url-builder" import { isBizId } from "~/lib/utils" +import { useBoostModal } from "~/modules/boost/hooks" import { useFeedClaimModal } from "~/modules/claim" import { FeedForm } from "~/modules/discover/feed-form" import { InboxForm } from "~/modules/discover/inbox-form" @@ -52,6 +53,7 @@ export const useFeedActions = ({ const { mutateAsync: addFeedToListMutation } = useAddFeedToFeedList() const { mutateAsync: removeFeedFromListMutation } = useRemoveFeedFromFeedList() + const openBoostModal = useBoostModal() const listByView = useOwnedList(view!) @@ -86,6 +88,13 @@ export const useFeedActions = ({ }, ] : []), + { + type: "text" as const, + label: "Boost", + click: () => { + openBoostModal(feedId) + }, + }, { type: "separator" as const, disabled: isEntryList,