Skip to content

Commit 1f6af4d

Browse files
committed
Fix author icon url not rendering in preview
1 parent 6231221 commit 1f6af4d

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

services/backend-api/client/src/components/DiscordView/Embed.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,7 @@ const EmbedFooter = ({
159159
timestamp,
160160
text,
161161
icon_url,
162-
}: {
163-
timestamp?: string | null;
164-
text?: string | null;
165-
icon_url?: string | null;
166-
}) => {
162+
}: Exclude<DiscordViewEmbed["footer"], undefined | null>) => {
167163
if (!text && !timestamp) {
168164
return null;
169165
}

services/backend-api/client/src/pages/Previewer/utils/convertPreviewerStateToConnectionPreviewInput.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const convertLegacyEmbedPreviewerComponentToEmbed = (embedComponent: LegacyEmbed
115115
embed.author = {
116116
name: subComponent.authorName || null,
117117
url: subComponent.authorUrl || null,
118-
icon_url: subComponent.authorIconUrl || null,
118+
iconUrl: subComponent.authorIconUrl || null,
119119
};
120120
} else if (subComponent.type === ComponentType.LegacyEmbedTitle) {
121121
embed.title = subComponent.title || null;
@@ -133,7 +133,7 @@ const convertLegacyEmbedPreviewerComponentToEmbed = (embedComponent: LegacyEmbed
133133
} else if (subComponent.type === ComponentType.LegacyEmbedFooter) {
134134
embed.footer = {
135135
text: subComponent.footerText || null,
136-
icon_url: subComponent.footerIconUrl || null,
136+
iconUrl: subComponent.footerIconUrl || null,
137137
};
138138
} else if (subComponent.type === ComponentType.LegacyEmbedField) {
139139
if (!embed.fields) {

services/backend-api/client/src/types/PreviewEmbedInput.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ export interface PreviewEmbedInput {
77
footer?: {
88
timestamp?: string | null;
99
text?: string | null;
10-
icon_url?: string | null;
10+
iconUrl?: string | null;
1111
} | null;
1212
thumbnail?: {
1313
url?: string | null;
1414
} | null;
1515
author?: {
1616
name?: string | null;
1717
url?: string | null;
18-
icon_url?: string | null;
18+
iconUrl?: string | null;
1919
} | null;
2020
fields?: Array<{
2121
name?: string | null;

0 commit comments

Comments
 (0)