This commit is contained in:
MuslemRahimi 2024-11-17 23:55:53 +01:00
parent 7aca116da6
commit 5b26ad5672
2 changed files with 6 additions and 3 deletions

View File

@ -1,4 +1,4 @@
export const load = async ({ locals }) => {
export const load = async ({ locals, setHeaders }) => {
const getAllHedgeFunds = async () => {
const { apiURL, apiKey } = locals;
const response = await fetch(apiURL + "/all-hedge-funds", {
@ -10,6 +10,7 @@ export const load = async ({ locals }) => {
});
const output = await response.json();
setHeaders({ "cache-control": "public, max-age=3000" });
return output;
};

View File

@ -355,9 +355,11 @@
</td>
<td
class="{item?.changeInSharesNumberPercentage >= 0
class="{item?.changeInSharesNumberPercentage > 0
? "before:content-['+'] text-[#00FC50]"
: 'text-[#FF2F1F]'} text-end font-medium text-sm sm:text-[1rem] whitespace-nowrap"
: item?.changeInSharesNumberPercentage < 0
? 'text-[#FF2F1F]'
: 'text-white'} text-end font-medium text-sm sm:text-[1rem] whitespace-nowrap"
>
{item?.changeInSharesNumberPercentage !== null
? abbreviateNumber(