This commit is contained in:
MuslemRahimi 2024-09-21 20:31:19 +02:00
parent dd069c720a
commit f394ee5cfe
2 changed files with 11 additions and 7 deletions

View File

@ -407,11 +407,13 @@ if(watchList && isLoaded)
<tbody class="p-0"> <tbody class="p-0">
{#each watchList as item, index} {#each watchList as item, index}
<!-- row --> <!-- row -->
<tr on:click={() => goto(`/${item?.type === 'stock' ? 'stocks' : item?.type === 'etf' ? 'etf' : 'crypto'}/${item?.symbol}`)} class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] border-b-[#09090B] cursor-pointer"> <tr class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] border-b-[#09090B]">
<td class="text-blue-400 text-sm sm:text-[1rem] text-start border-b-[#09090B]"> <td class="text-sm sm:text-[1rem] text-start border-b-[#09090B]">
{item?.symbol} <a href={`/${item?.type === 'stock' ? 'stocks' : item?.type === 'etf' ? 'etf' : 'crypto'}/${item?.symbol}`} class="text-blue-400 sm:hover:text-white">
{item?.symbol}
</a>
</td> </td>
<td class="text-white text-sm sm:text-[1rem] border-b-[#09090B] whitespace-nowrap"> <td class="text-white text-sm sm:text-[1rem] border-b-[#09090B] whitespace-nowrap">

View File

@ -68,7 +68,7 @@ use([BarChart, GridComponent, TooltipComponent, CanvasRenderer])
// Handle default case if needed // Handle default case if needed
break; break;
} }
goto("/list/" + path); return path
} }
@ -537,9 +537,11 @@ onMount(async () => {
<tbody> <tbody>
{#each rawData?.topSectors as item} {#each rawData?.topSectors as item}
{#each Object.entries(item) as [name, value]} {#each Object.entries(item) as [name, value]}
<tr on:click={() => sectorSelector(name)} class="text-white cursor-pointer sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#141417] border-b border-[#141417]"> <tr class="text-white sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] bg-[#141417] border-b border-[#141417]">
<td class="text-blue-400 sm:hover:text-white duration-100 text-[1rem] whitespace-nowrap"> <td class="text-[1rem] whitespace-nowrap">
{name} <a href={"/list/"+sectorSelector(name)} class="text-blue-400 sm:hover:text-white">
{name}
</a>
</td> </td>
<td class="text-white text-[1rem] whitespace-nowrap text-end"> <td class="text-white text-[1rem] whitespace-nowrap text-end">
{value?.toFixed(2)}% {value?.toFixed(2)}%