diff --git a/src/renderer/src/modules/profile/user-profile-modal.tsx b/src/renderer/src/modules/profile/user-profile-modal.tsx index fa2044c34..8a4e2c912 100644 --- a/src/renderer/src/modules/profile/user-profile-modal.tsx +++ b/src/renderer/src/modules/profile/user-profile-modal.tsx @@ -18,9 +18,7 @@ import type { FeedViewType } from "@renderer/lib/enum" import { cn } from "@renderer/lib/utils" import type { SubscriptionModel } from "@renderer/models" import { useUserSubscriptionsQuery } from "@renderer/modules/profile/hooks" -import { - useSubscriptionStore, -} from "@renderer/store/subscription" +import { useSubscriptionStore } from "@renderer/store/subscription" import { useAnimationControls } from "framer-motion" import type { FC } from "react" import { Fragment, useEffect, useState } from "react" @@ -103,21 +101,28 @@ export const UserProfileModalContent: FC<{
- {Object.keys(subscriptions.data || {}).map((category) => ( -
-
-

{category}

+ {subscriptions.isLoading ? ( + + ) : ( + subscriptions.data && Object.keys(subscriptions.data).map((category) => ( +
+
+

{category}

+
+
+ {subscriptions.data?.[category].map((subscription) => ( + + ))} +
-
- {subscriptions.data?.[category].map((subscription) => ( - - ))} -
-
- ))} + )) + )}
)} @@ -164,7 +169,9 @@ const SubscriptionItem: FC<{ const defaultView = getSidebarActiveView() as FeedViewType present({ - title: `${isFollowed ? "Edit " : ""}${APP_NAME} - ${subscription.feeds.title}`, + title: `${isFollowed ? "Edit " : ""}${APP_NAME} - ${ + subscription.feeds.title + }`, content: ({ dismiss }) => (