diff --git a/apps/desktop/layer/renderer/src/modules/discover/DiscoverForm.tsx b/apps/desktop/layer/renderer/src/modules/discover/DiscoverForm.tsx index c2aa4048c..8b3c18cef 100644 --- a/apps/desktop/layer/renderer/src/modules/discover/DiscoverForm.tsx +++ b/apps/desktop/layer/renderer/src/modules/discover/DiscoverForm.tsx @@ -24,7 +24,6 @@ import { useTranslation } from "react-i18next" import { useSearchParams } from "react-router" import { z } from "zod" -import { useIsInMASReview } from "~/atoms/server-configs" import { useModalStack } from "~/components/ui/modal/stacked/hooks" import { useRequireLogin } from "~/hooks/common/useRequireLogin" import { followClient } from "~/lib/api-client" @@ -127,19 +126,15 @@ export function DiscoverForm({ type = "search" }: { type?: string }) { const target = watch("target") const atomKey = keywordFromSearch + target const { t } = useTranslation() - const isInMASReview = useIsInMASReview() const { ensureLogin } = useRequireLogin() const jotaiStore = useStore() const mutation = useMutation({ mutationFn: async ({ keyword, target }: { keyword: string; target: "feeds" | "lists" }) => { - let { data } = await followClient.api.discover.discover({ + const { data } = await followClient.api.discover.discover({ keyword: keyword.trim(), target, }) - if (isInMASReview) { - data = data.filter((item) => !item.list?.fee) - } jotaiStore.set(discoverSearchDataAtom, (prev) => ({ ...prev, diff --git a/apps/desktop/layer/renderer/src/modules/discover/ListForm.tsx b/apps/desktop/layer/renderer/src/modules/discover/ListForm.tsx index 41a96da4f..e2fc456b1 100644 --- a/apps/desktop/layer/renderer/src/modules/discover/ListForm.tsx +++ b/apps/desktop/layer/renderer/src/modules/discover/ListForm.tsx @@ -256,15 +256,7 @@ const ListInnerForm = ({ return (
- +
)} /> - {!!list.fee && !isSubscribed && ( -
- - {t("feed_form.fee")}{" "} -
- {list.fee} - -
-
- {t("feed_form.fee_description")} -
- )}
{isSubscribed && (
diff --git a/apps/desktop/layer/renderer/src/modules/discover/UnifiedDiscoverForm.tsx b/apps/desktop/layer/renderer/src/modules/discover/UnifiedDiscoverForm.tsx index 09f1593cd..e59934cbe 100644 --- a/apps/desktop/layer/renderer/src/modules/discover/UnifiedDiscoverForm.tsx +++ b/apps/desktop/layer/renderer/src/modules/discover/UnifiedDiscoverForm.tsx @@ -24,7 +24,6 @@ import { useTranslation } from "react-i18next" import { useSearchParams } from "react-router" import { z } from "zod" -import { useIsInMASReview } from "~/atoms/server-configs" import { useModalStack } from "~/components/ui/modal/stacked/hooks" import { useRequireLogin } from "~/hooks/common/useRequireLogin" import { followClient } from "~/lib/api-client" @@ -96,7 +95,6 @@ export function UnifiedDiscoverForm() { const [searchParams, setSearchParams] = useSearchParams() const keywordFromSearch = searchParams.get("keyword") || "" const { t } = useTranslation() - const isInMASReview = useIsInMASReview() const { ensureLogin } = useRequireLogin() const { present, dismissAll } = useModalStack() const isMobile = useMobile() @@ -163,13 +161,10 @@ export function UnifiedDiscoverForm() { } // For search, perform discovery - let { data } = await followClient.api.discover.discover({ + const { data } = await followClient.api.discover.discover({ keyword: keyword.trim(), target, }) - if (isInMASReview) { - data = data.filter((item) => !item.list?.fee) - } setDiscoverSearchData((prev) => ({ ...prev, diff --git a/apps/desktop/layer/renderer/src/modules/profile/user-profile-modal/UserProfileModalContent.tsx b/apps/desktop/layer/renderer/src/modules/profile/user-profile-modal/UserProfileModalContent.tsx index 6c0baf469..360f8b148 100644 --- a/apps/desktop/layer/renderer/src/modules/profile/user-profile-modal/UserProfileModalContent.tsx +++ b/apps/desktop/layer/renderer/src/modules/profile/user-profile-modal/UserProfileModalContent.tsx @@ -98,27 +98,18 @@ const ListCard = memo(({ list }: { list: ListWithStats }) => {
{/* Stats Footer */} - {(typeof list.subscriptionCount === "number" || - (typeof list.fee === "number" && list.fee > 0)) && ( + {typeof list.subscriptionCount === "number" && (
- {typeof list.subscriptionCount === "number" && ( -
- - - {list.subscriptionCount} - - {list.subscriptionCount > 1 ? "subscribers" : "subscriber"} - +
+ + + {list.subscriptionCount} + + {list.subscriptionCount > 1 ? "subscribers" : "subscriber"} -
- )} - {typeof list.fee === "number" && list.fee > 0 && ( -
- - {list.fee} -
- )} +
+
)} diff --git a/apps/desktop/layer/renderer/src/modules/settings/tabs/lists/index.tsx b/apps/desktop/layer/renderer/src/modules/settings/tabs/lists/index.tsx index f72593fb0..9044b65e6 100644 --- a/apps/desktop/layer/renderer/src/modules/settings/tabs/lists/index.tsx +++ b/apps/desktop/layer/renderer/src/modules/settings/tabs/lists/index.tsx @@ -28,7 +28,6 @@ import { toast } from "sonner" import { useCurrentModal, useModalStack } from "~/components/ui/modal/stacked/hooks" import { useI18n } from "~/hooks/common" import { UrlBuilder } from "~/lib/url-builder" -import { Balance } from "~/modules/wallet/balance" import { ListCreationModalContent, ListFeedsModalContent } from "./modals" @@ -75,7 +74,6 @@ export const SettingLists = () => { acc[curr.id] = { id: curr.id, subscriptionCount: curr.subscriptionCount, - purchaseAmount: Number(curr.purchaseAmount || 0), } return acc }, @@ -84,7 +82,6 @@ export const SettingLists = () => { { id: string subscriptionCount: number | null | undefined - purchaseAmount: number | null | undefined } >, ) @@ -126,9 +123,7 @@ export const SettingLists = () => { {t.settings("lists.title")} {t.settings("lists.view")} - {t.settings("lists.fee.label")} {t.settings("lists.subscriptions")} - {t.settings("lists.earnings")} {t.common("words.actions")} @@ -172,18 +167,9 @@ export const SettingLists = () => { - -
- {row.fee} - -
-
{formatNumber(listDataMap[row.id]?.subscriptionCount || 0)} - - {BigInt(listDataMap[row.id]?.purchaseAmount || 0n)} - diff --git a/apps/desktop/layer/renderer/src/modules/settings/tabs/lists/modals.tsx b/apps/desktop/layer/renderer/src/modules/settings/tabs/lists/modals.tsx index ab7bcfc1f..a88f89d34 100644 --- a/apps/desktop/layer/renderer/src/modules/settings/tabs/lists/modals.tsx +++ b/apps/desktop/layer/renderer/src/modules/settings/tabs/lists/modals.tsx @@ -4,7 +4,6 @@ import { Divider } from "@follow/components/ui/divider/index.js" import { Form, FormControl, - FormDescription, FormField, FormItem, FormLabel, @@ -50,7 +49,6 @@ const formSchema = z.object({ title: z.string().min(1), description: z.string().optional(), image: z.string().optional(), - fee: z.number().min(0), }) export const ListCreationModalContent = ({ id }: { id?: string }) => { @@ -63,7 +61,6 @@ export const ListCreationModalContent = ({ id }: { id?: string }) => { resolver: zodResolver(formSchema), defaultValues: { view: list?.view.toString() || FeedViewType.Articles.toString(), - fee: list?.fee || 0, title: list?.title || "", description: list?.description || "", image: list?.image || "", @@ -172,32 +169,6 @@ export const ListCreationModalContent = ({ id }: { id?: string }) => { )} /> - ( - -
- {t("lists.fee.label")} - {t("lists.fee.description")} -
- -
- field.onChange(value.target.valueAsNumber)} - /> - -
-
- -
- )} - />
)} - {typeof list.fee === "number" && list.fee > 0 && ( -
- - {list.fee} -
- )}
diff --git a/packages/internal/store/src/modules/list/store.ts b/packages/internal/store/src/modules/list/store.ts index d25b867f7..66e415123 100644 --- a/packages/internal/store/src/modules/list/store.ts +++ b/packages/internal/store/src/modules/list/store.ts @@ -99,7 +99,6 @@ class ListSyncServices { description: params.list.description, image: params.list.image, view: params.list.view, - fee: params.list.fee || 0, }) await listActions.upsertMany([apiMorph.toList(res.data)]) await subscriptionActions.upsertMany([ @@ -126,7 +125,6 @@ class ListSyncServices { description: params.list.description, image: params.list.image, view: params.list.view, - fee: params.list.fee || 0, listId: params.listId, } diff --git a/packages/internal/store/src/modules/list/types.ts b/packages/internal/store/src/modules/list/types.ts index 8a27db634..8c82d2fc1 100644 --- a/packages/internal/store/src/modules/list/types.ts +++ b/packages/internal/store/src/modules/list/types.ts @@ -1,6 +1,6 @@ import type { ListSchema } from "@follow/database/schemas/types" -export type CreateListModel = Pick & { +export type CreateListModel = Pick & { title: string } diff --git a/packages/internal/store/src/morph/api.ts b/packages/internal/store/src/morph/api.ts index 1097a64e8..fc428db07 100644 --- a/packages/internal/store/src/morph/api.ts +++ b/packages/internal/store/src/morph/api.ts @@ -151,7 +151,7 @@ class APIMorph { image: list.image!, ownerUserId: list.owner.id, feedIds: list.feedIds!, - fee: list.fee!, + fee: list.fee ?? 0, subscriptionCount: null, purchaseAmount: null, type: "list",