diff --git a/src/lib/components/IndexSidecard.svelte b/src/lib/components/IndexSidecard.svelte
index 05d9d57f..70c5aed6 100644
--- a/src/lib/components/IndexSidecard.svelte
+++ b/src/lib/components/IndexSidecard.svelte
@@ -1,47 +1,28 @@
@@ -54,22 +35,7 @@
{description}
-
- {$etfTicker} Stock Price History
+ {$indexTicker} Stock Price History
{
const { apiKey, apiURL } = locals;
const getETFHoldings = async () => {
- const postData = {
- ticker: params.tickerID,
- };
+
+ console.log(params.tickerID?.toLowerCase())
+
+ let postData = {ticker: params.tickerID,}
+ if (params.tickerID?.toLowerCase() === '^spx') {
+ postData['ticker'] = 'spy';
+ }
+
// make the POST request to the endpoint
const response = await fetch(apiURL + "/etf-holdings", {
diff --git a/src/routes/index/[tickerID]/holdings/+page.svelte b/src/routes/index/[tickerID]/holdings/+page.svelte
index bc4a5206..e0eee688 100644
--- a/src/routes/index/[tickerID]/holdings/+page.svelte
+++ b/src/routes/index/[tickerID]/holdings/+page.svelte
@@ -1,12 +1,12 @@
-
-
-
-
- {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""}
- {$displayCompanyName} ({$etfTicker}) Holdings List · Stocknear
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
- {$etfTicker} Holdings List
+ {$indexTicker} Holdings List
{#if data?.getETFHoldings?.lastUpdate}
- import { etfTicker } from "$lib/store";
+ import { indexTicker } from "$lib/store";
import ArrowLogo from "lucide-svelte/icons/move-up-right";
import { page } from "$app/stores";
@@ -11,7 +11,6 @@
const subSectionMap = {
overview: "/options",
"hottest-contracts": "/options/hottest-contracts",
- "unusual-activity": "/options/unusual-activity",
volatility: "/options/volatility",
gex: "/options/gex",
dex: "/options/dex",
@@ -20,10 +19,10 @@
if (state !== "overview" && subSectionMap[state]) {
displaySubSection = state;
- //goto(`/etf/${$etfTicker}${subSectionMap[state]}`);
+ //goto(`/index/${$indexTicker}${subSectionMap[state]}`);
} else {
displaySubSection = state;
- //goto(`/etf/${$etfTicker}/statistics`);
+ //goto(`/index/${$indexTicker}/statistics`);
}
}
@@ -33,7 +32,6 @@
const sectionMap = {
overview: "overview",
"hottest-contracts": "hottest-contracts",
- "unusual-activity": "unusual-activity",
volatility: "volatility",
gex: "gex",
dex: "dex",
@@ -64,7 +62,7 @@
>
changeSubSection("overview")}
class="p-2 px-5 cursor-pointer {displaySubSection === 'overview'
? 'text-white bg-primary sm:hover:bg-opacity-[0.95]'
@@ -73,17 +71,7 @@
Overview
changeSubSection("unusual-activity")}
- class="p-2 px-5 cursor-pointer {displaySubSection ===
- 'unusual-activity'
- ? 'text-white bg-primary sm:hover:bg-opacity-[0.95]'
- : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}"
- >
- Unusual Activity
-
- changeSubSection("hottest-contracts")}
class="p-2 px-5 cursor-pointer {displaySubSection ===
'hottest-contracts'
@@ -93,7 +81,7 @@
Hottest Contracts
changeSubSection("volatility")}
class="p-2 px-5 cursor-pointer {displaySubSection ===
'volatility'
@@ -103,7 +91,7 @@
Volatility
changeSubSection("oi")}
class="p-2 px-5 cursor-pointer {displaySubSection === 'oi'
? 'text-white bg-primary sm:hover:bg-opacity-[0.95]'
@@ -113,7 +101,7 @@
changeSubSection("gex")}
class="p-2 px-5 cursor-pointer {displaySubSection === 'gex'
? 'text-white bg-primary sm:hover:bg-opacity-[0.95]'
@@ -122,7 +110,7 @@
GEX
changeSubSection("dex")}
class="p-2 px-5 cursor-pointer {displaySubSection === 'dex'
? 'text-white bg-primary sm:hover:bg-opacity-[0.95]'
@@ -142,7 +130,7 @@
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer bg-inherit sm:hover:bg-secondary transition ease-out duration-100"
>
diff --git a/src/routes/index/[tickerID]/options/+page.svelte b/src/routes/index/[tickerID]/options/+page.svelte
index 9769618c..a16a205e 100644
--- a/src/routes/index/[tickerID]/options/+page.svelte
+++ b/src/routes/index/[tickerID]/options/+page.svelte
@@ -1,5 +1,5 @@
Contract: {$etfTicker}
+ >{$indexTicker}
{strikePrice}
{optionType}
{dateExpiration} ({daysLeft(dateExpiration)})
diff --git a/src/routes/index/[tickerID]/options/oi/+layout.svelte b/src/routes/index/[tickerID]/options/oi/+layout.svelte
index c74d732a..d9b74160 100644
--- a/src/routes/index/[tickerID]/options/oi/+layout.svelte
+++ b/src/routes/index/[tickerID]/options/oi/+layout.svelte
@@ -1,5 +1,5 @@
-
-
-
-
-
-
- {#if data?.getData?.length > 0}
-
- {:else}
-
- {/if}
-
-
-
diff --git a/src/routes/index/[tickerID]/options/volatility/+page.svelte b/src/routes/index/[tickerID]/options/volatility/+page.svelte
index 239f8db6..a8631211 100644
--- a/src/routes/index/[tickerID]/options/volatility/+page.svelte
+++ b/src/routes/index/[tickerID]/options/volatility/+page.svelte
@@ -1,5 +1,5 @@
diff --git a/src/routes/stocks/[tickerID]/+layout.svelte b/src/routes/stocks/[tickerID]/+layout.svelte
index 288e4923..1b8c086f 100644
--- a/src/routes/stocks/[tickerID]/+layout.svelte
+++ b/src/routes/stocks/[tickerID]/+layout.svelte
@@ -389,9 +389,7 @@
class="flex-1 flex-shrink-0 flex flex-row items-center justify-between -mt-2"
>