bugfixing
This commit is contained in:
parent
f717fe45a3
commit
d800bd9084
@ -1,6 +1,6 @@
|
||||
export const load = async ({ locals }) => {
|
||||
const { apiKey, apiURL} = locals;
|
||||
const getNews = async () => {
|
||||
const { apiKey, apiURL } = locals;
|
||||
const getNews = async () => {
|
||||
const postData = { newsType: "ipo-news" };
|
||||
// make the POST request to the endpoint
|
||||
const response = await fetch(apiURL + "/market-news", {
|
||||
@ -17,9 +17,7 @@ export const load = async ({ locals }) => {
|
||||
return output;
|
||||
};
|
||||
|
||||
|
||||
const getIPOCalendar = async () => {
|
||||
|
||||
// make the POST request to the endpoint
|
||||
const postData = { year: "all" };
|
||||
|
||||
@ -34,12 +32,9 @@ export const load = async ({ locals }) => {
|
||||
|
||||
const output = await response.json();
|
||||
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Make sure to return a promise
|
||||
return {
|
||||
getNews: await getNews(),
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
export let data;
|
||||
|
||||
let ipoNews = data?.getNews;
|
||||
console.log(ipoNews);
|
||||
let rawData = data?.getIPOCalendar?.slice(0, 200) ?? [];
|
||||
const excludedRules = new Set([
|
||||
"volume",
|
||||
|
||||
@ -1,13 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { onMount, onDestroy } from "svelte";
|
||||
import { goto } from "$app/navigation";
|
||||
import {
|
||||
clearCache,
|
||||
screenWidth,
|
||||
numberOfUnreadNotification,
|
||||
getCache,
|
||||
setCache,
|
||||
} from "$lib/store";
|
||||
import { clearCache, screenWidth, getCache, setCache } from "$lib/store";
|
||||
import toast from "svelte-french-toast";
|
||||
import {
|
||||
abbreviateNumber,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user