mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-05 18:40:56 +01:00
Fixed nested template
This commit is contained in:
parent
7cf8856ffe
commit
664fc38ebc
1 changed files with 4 additions and 1 deletions
|
@ -25,7 +25,10 @@ const generateTweetMedia = (tweet: APITweet): string => {
|
||||||
// eslint-disable-next-line no-case-declarations
|
// eslint-disable-next-line no-case-declarations
|
||||||
const { altText } = mediaItem as APIPhoto;
|
const { altText } = mediaItem as APIPhoto;
|
||||||
// eslint-disable-next-line sonarjs/no-nested-template-literals
|
// eslint-disable-next-line sonarjs/no-nested-template-literals
|
||||||
media += `<img src="${mediaItem.url}" ${altText ? `alt="${altText}"` : ''}/>`;
|
media += `<img src="{url}" {altText}/>`.format({
|
||||||
|
altText: altText ? `alt="${altText}"` : '',
|
||||||
|
url: mediaItem.url
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case 'video':
|
case 'video':
|
||||||
media += `<video src="${mediaItem.url}" alt="${tweet.author.name}'s video. Alt text not available."/>`;
|
media += `<video src="${mediaItem.url}" alt="${tweet.author.name}'s video. Alt text not available."/>`;
|
||||||
|
|
Loading…
Add table
Reference in a new issue