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