This commit is contained in:
MuslemRahimi 2024-11-29 18:44:52 +01:00
parent 46c0396c2c
commit 5d29880469
3 changed files with 14 additions and 20 deletions

View File

@ -12,6 +12,7 @@
currentPrice,
priceIncrease,
stockTicker,
assetType,
displayCompanyName,
isOpen,
shouldUpdatePriceChart,
@ -32,6 +33,10 @@
let previousTicker;
let socket;
$stockTicker = data?.getParams;
$assetType = "stock";
$displayCompanyName = data?.companyName;
let isScrolled = false;
let y;
@ -259,7 +264,9 @@
typeof window !== "undefined"
) {
// add a check to see if running on client-side
$stockTicker = data?.getParams;
$assetType = "stock";
$displayCompanyName = data?.companyName;
$currentPortfolioPrice = data?.getStockQuote?.price;
prePostData = data?.getPrePostQuote || {};
const output = [...data?.getOneDayPrice] ?? [];

View File

@ -1,13 +0,0 @@
import {
stockTicker,
displayCompanyName,
assetType,
} from "$lib/store";
export const load = async ({ data }) => {
stockTicker.set(data?.getParams?.toUpperCase());
assetType.set("stock");
displayCompanyName.set(data?.companyName);
};

View File

@ -729,21 +729,21 @@
<meta name="viewport" content="width=device-width" />
<title>
{$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""}
{$displayCompanyName} ({$stockTicker}) Stock Price, Quote & News · stocknear
{data?.companyName} ({$stockTicker}) Stock Price, Quote & News · stocknear
</title>
<meta
name="description"
content={`Get a real-time ${$displayCompanyName} (${$stockTicker}) stock chart, price quote with breaking news, financials, statistics, charts and more.`}
content={`Get a real-time ${data?.companyName} (${$stockTicker}) stock chart, price quote with breaking news, financials, statistics, charts and more.`}
/>
<!-- Other meta tags -->
<meta
property="og:title"
content={`${$displayCompanyName} (${$stockTicker}) Stock Price, Quote & News · stocknear`}
content={`${data?.companyName} (${$stockTicker}) Stock Price, Quote & News · stocknear`}
/>
<meta
property="og:description"
content={`Get a real-time ${$displayCompanyName} (${$stockTicker}) stock chart, price quote with breaking news, financials, statistics, charts and more.`}
content={`Get a real-time ${data?.companyName} (${$stockTicker}) stock chart, price quote with breaking news, financials, statistics, charts and more.`}
/>
<!--<meta property="og:image" content="https://stocknear-pocketbase.s3.amazonaws.com/logo/meta_logo.jpg"/>-->
<meta property="og:type" content="website" />
@ -753,11 +753,11 @@
<meta name="twitter:card" content="summary_large_image" />
<meta
name="twitter:title"
content={`${$displayCompanyName} (${$stockTicker}) Stock Price, Quote & News · stocknear`}
content={`${data?.companyName} (${$stockTicker}) Stock Price, Quote & News · stocknear`}
/>
<meta
name="twitter:description"
content={`Get a real-time ${$displayCompanyName} (${$stockTicker}) stock chart, price quote with breaking news, financials, statistics, charts and more.`}
content={`Get a real-time ${data?.companyName} (${$stockTicker}) stock chart, price quote with breaking news, financials, statistics, charts and more.`}
/>
<!--<meta name="twitter:image" content="https://stocknear-pocketbase.s3.amazonaws.com/logo/meta_logo.jpg"/>-->
<!-- Add more Twitter meta tags as needed -->