diff --git a/src/renderer/src/components/subscribe/form.tsx b/src/renderer/src/components/subscribe/form.tsx index c72f7991fc..2a82562c74 100644 --- a/src/renderer/src/components/subscribe/form.tsx +++ b/src/renderer/src/components/subscribe/form.tsx @@ -79,10 +79,13 @@ export function SubscribeForm({ type }: { type: string }) { }, ) ).json() - ).data as (FeedResponse & { + ).data as { + feed: Partial docs?: string - entries?: EntriesResponse - })[] + entries?: Partial + isSubscribed?: boolean + subscriptionCount?: number + }[] }, }) console.log(mutation.data) @@ -129,18 +132,24 @@ export function SubscribeForm({ type }: { type: string }) {
{mutation.data.map((item) => ( - +
{(() => { - if (item.image) { + if (item.feed.image) { return ( - + ) - } else if (item.siteUrl) { + } else if (item.feed.siteUrl) { return ( - + ) } else if (item.docs) { return ( @@ -154,15 +163,17 @@ export function SubscribeForm({ type }: { type: string }) { } })()}
- {item.title} + {item.feed.title}
-
{item.url || item.docs}
+
+ {item.feed.url || item.docs} +
- {item.description} + {item.feed.description}
@@ -178,22 +189,38 @@ export function SubscribeForm({ type }: { type: string }) {
{item.entries.map((entry) => (
- -
- {entry.title} -
+ {entry?.images?.[0] ? ( + <> + +
+ {entry?.title} +
+ + ) : ( +
+ {entry?.title} +
+ )}
))}
)} - + {item.isSubscribed ? ( + + ) : ( + + )}
- 0{" "} + + {item.subscriptionCount} + {" "} Followers
diff --git a/src/renderer/src/pages/(main)/subscribe/index.tsx b/src/renderer/src/pages/(main)/subscribe/index.tsx index 6355f75820..ca7cc60990 100644 --- a/src/renderer/src/pages/(main)/subscribe/index.tsx +++ b/src/renderer/src/pages/(main)/subscribe/index.tsx @@ -41,7 +41,7 @@ export function Component() {
Subscribe
- + {tabs.map((tab) => (