diff --git a/src/lib/components/News.svelte b/src/lib/components/News.svelte index eaf33a13..97f85db7 100644 --- a/src/lib/components/News.svelte +++ b/src/lib/components/News.svelte @@ -140,75 +140,40 @@ {#if rawData?.length > 0} {#if isLoaded} -
- {#each filteredNewsList as item, index} -
- {#if checkIfYoutubeVideo(item.url)} - {#if showVideo[index]} - -
- -
- {:else} - -
-
-
handlePlayClick(index)} - > + {#if filteredNewsList?.length > 0} +
+ {#each filteredNewsList as item, index} +
+ {#if checkIfYoutubeVideo(item.url)} + {#if showVideo[index]} + +
+ +
+ {:else} + +
+
+ class="group relative block cursor-pointer bg-black bg-cover bg-[center_50%] object-contain after:block after:pb-[56.25%] after:content-[''] rounded-sm focus:outline-none focus:ring-2 focus:ring-blue-brand_light focus:ring-offset-2" + style="background-image: url({item?.image});" + tabindex="0" + on:click={() => handlePlayClick(index)} + > +
+
-
- {/if} - - {:else} - -
- -
- news image -
-
-
+ {/if} +

{formatDate(item?.publishedDate)} · {item?.site}

@@ -226,12 +191,76 @@

+ {:else} + + + {/if} +
+
+ {/each} +
+ {:else} +
+
+
+ +
+
+
+ No {displaySection === "videos" ? "videos" : "articles"} found + for this stock. +
+
- {/if} +
-
- {/each} -
+
+ {/if} {#if newsList?.length !== rawData?.length}