@@ -210,7 +210,7 @@ isLoaded = true;
-
+
@@ -330,11 +330,14 @@ isLoaded = true;
{/each}
+
+
+
-
+
{:else}
diff --git a/src/routes/crypto/[tickerID]/news/+page.svelte b/src/routes/crypto/[tickerID]/news/+page.svelte
index ea7c99ab..7fb7a00c 100644
--- a/src/routes/crypto/[tickerID]/news/+page.svelte
+++ b/src/routes/crypto/[tickerID]/news/+page.svelte
@@ -1,138 +1,135 @@
-
-
-
-
-
-
-
- {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ''} {$displayCompanyName} ({$cryptoTicker}) latest Stock Market News and Breaking Stories · stocknear
-
-
+ import {numberOfUnreadNotification, displayCompanyName, cryptoTicker} from '$lib/store';
+ import { formatDate } from '$lib/utils';
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ export let data;
-
-
-
-
-
-
-
-
-
- News
-
-
-
- {#if newsList.length !== 0}
-
- {#each newsList as item}
-
- {#if videoId = checkIfYoutubeVideo(item.url)}
-
- {:else}
-
-
-

-
-
- {/if}
-
-
-
-
- {/each}
+
+
+
+ let rawNews = data?.getStockNews;
+ let newsList = rawNews?.slice(0,20) ?? [];
+
+
+ let videoId = null;
+
+ function checkIfYoutubeVideo(link) {
+
+ const url = new URL(link);
+ if (url?.hostname === "www.youtube.com") {
+ const searchParams = url.searchParams;
+ searchParams.delete('t'); // Remove the "t" parameter
+ const videoIdMatch = url?.search?.match(/v=([^&]+)/);
+
+ if (videoIdMatch) {
+ return videoIdMatch[1];
+ }
+ } else {
+ return null;
+ }
+ }
+
+ function loadMoreData() {
+ const nextIndex = newsList?.length;
+ const newArticles = rawNews?.slice(nextIndex, nextIndex + 20);
+ newsList = [...newsList, ...newArticles];
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+ {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ''} {$displayCompanyName} ({$cryptoTicker}) latest Stock Market News and Breaking Stories · stocknear
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ News
+
+
+
+ {#if newsList?.length !== 0}
+
+ {#each newsList as item}
+
+ {#if videoId = checkIfYoutubeVideo(item.url)}
+
+ {:else}
+
+
+

+
+
+ {/if}
+
+
-
- {#if newsList?.length !== rawNews?.length}
-
- {/if}
-
-
- {:else}
-
-
- No news article published yet!
-
- {/if}
-
-
-
-
-
-
\ No newline at end of file
+
+ {/each}
+
+
+ {#if newsList?.length !== rawNews?.length}
+
+ {/if}
+
+
+ {:else}
+
+
+ No news article published yet!
+
+ {/if}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/routes/etf/[tickerID]/+page.svelte b/src/routes/etf/[tickerID]/+page.svelte
index 53c754b1..f3ba85fa 100644
--- a/src/routes/etf/[tickerID]/+page.svelte
+++ b/src/routes/etf/[tickerID]/+page.svelte
@@ -873,7 +873,7 @@ async function initializePrice() {
-
-
-
-
-
-
-
+
+
-
\ No newline at end of file
+
+ @media (max-width: 560px) {
+ .app {
+ max-width: 520px;
+ height: 420px;
+ }
+ }
+
+ .chart {
+ width: 100%;
+ }
+
\ No newline at end of file