bugfixing

This commit is contained in:
MuslemRahimi 2025-04-09 13:29:06 +02:00
parent cf7bc59f4d
commit 22a598c6bb

View File

@ -472,8 +472,6 @@
shouldUpdate = true; shouldUpdate = true;
} catch (error) { } catch (error) {
console.error("Error loading data:", error); console.error("Error loading data:", error);
} finally {
isLoaded = true;
} }
} }
@ -741,8 +739,6 @@
config = plotData(); config = plotData();
userStrategy = [...userStrategy]; userStrategy = [...userStrategy];
isLoaded = true;
} }
} }
@ -800,7 +796,6 @@
</p> </p>
<div class="mt-4"> <div class="mt-4">
{#if isLoaded && config}
<div <div
class="{$screenWidth < 640 && $screenWidth class="{$screenWidth < 640 && $screenWidth
? 'grid grid-cols-2' ? 'grid grid-cols-2'
@ -937,9 +932,7 @@
<DropdownMenu.Content <DropdownMenu.Content
class="w-56 h-fit max-h-72 overflow-y-auto scroller" class="w-56 h-fit max-h-72 overflow-y-auto scroller"
> >
<DropdownMenu.Label <DropdownMenu.Label class="text-muted dark:text-gray-400">
class="text-muted dark:text-gray-400"
>
Select Strategy Select Strategy
</DropdownMenu.Label> </DropdownMenu.Label>
<DropdownMenu.Separator /> <DropdownMenu.Separator />
@ -1021,9 +1014,7 @@
> >
Price Price
</th> </th>
<th <th scope="col" class="px-4 py-1.5 text-sm font-semibold"
scope="col"
class="px-4 py-1.5 text-sm font-semibold"
></th> ></th>
</tr> </tr>
</thead> </thead>
@ -1064,9 +1055,7 @@
class="mb-1 border border-gray-300 dark:border-none bg-white dark:bg-[#000] h-[35px] flex flex-row justify-between items-center min-w-[130px] w-[140px] sm:w-auto px-3 rounded-md truncate" class="mb-1 border border-gray-300 dark:border-none bg-white dark:bg-[#000] h-[35px] flex flex-row justify-between items-center min-w-[130px] w-[140px] sm:w-auto px-3 rounded-md truncate"
> >
<span class="truncate text-sm" <span class="truncate text-sm"
>{formatDate( >{formatDate(userStrategy[index]?.date)}</span
userStrategy[index]?.date,
)}</span
> >
<svg <svg
class="-mr-1 ml-2 h-5 w-5 inline-block" class="-mr-1 ml-2 h-5 w-5 inline-block"
@ -1194,10 +1183,26 @@
</table> </table>
</div> </div>
{#if config}
<div <div
class="shadow-sm mt-5 border border-gray-300 dark:border-gray-800 rounded" class="shadow-sm mt-5 border border-gray-300 dark:border-gray-800 rounded"
use:highcharts={config} use:highcharts={config}
></div> ></div>
{:else}
<div
class="flex justify-center items-center h-[300px] sm:h-[350px]"
>
<div class="relative">
<label
class="shadow-sm bg-gray-300 dark:bg-secondary rounded h-14 w-14 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
>
<span
class="loading loading-spinner loading-md text-muted dark:text-gray-400"
></span>
</label>
</div>
</div>
{/if}
<div class="mt-10"> <div class="mt-10">
<h1 <h1
@ -1334,19 +1339,6 @@
</div> </div>
</div> </div>
</div> </div>
{:else}
<div class="flex justify-center items-center h-80">
<div class="relative">
<label
class="shadow-sm bg-gray-300 dark:bg-secondary rounded h-14 w-14 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
>
<span
class="loading loading-spinner loading-md text-muted dark:text-gray-400"
></span>
</label>
</div>
</div>
{/if}
</div> </div>
</div> </div>
</div> </div>