This commit is contained in:
MuslemRahimi 2025-03-03 22:07:00 +01:00
parent 4837d164e7
commit fefb1ec1a8
5 changed files with 5 additions and 7 deletions

View File

@ -587,7 +587,7 @@
<div class="flex flex-col ml-auto mr-2"> <div class="flex flex-col ml-auto mr-2">
{#if userWatchList?.length !== 0} {#if userWatchList?.length !== 0}
<div <div
class="shrink-0 rounded-full sm:hover:bg-white sm:hover:bg-opacity-[0.02] transition ease-out w-12 h-12 relative bg-default flex items-center justify-center" class="shrink-0 rounded-full sm:hover:bg-white/10 transition ease-out w-12 h-12 relative bg-default flex items-center justify-center"
> >
<label <label
for="addWatchListModal" for="addWatchListModal"

View File

@ -590,7 +590,7 @@
<div class="flex flex-col ml-auto mr-2"> <div class="flex flex-col ml-auto mr-2">
{#if userWatchList?.length !== 0} {#if userWatchList?.length !== 0}
<div <div
class="shrink-0 rounded-full sm:hover:bg-white sm:hover:bg-opacity-[0.02] transition ease-out w-12 h-12 relative bg-default flex items-center justify-center" class="shrink-0 rounded-full sm:hover:bg-white/10 transition ease-out w-12 h-12 relative bg-default flex items-center justify-center"
> >
<label <label
for="addWatchListModal" for="addWatchListModal"

View File

@ -606,7 +606,7 @@
<div class="flex flex-col ml-auto mr-2"> <div class="flex flex-col ml-auto mr-2">
{#if userWatchList?.length !== 0} {#if userWatchList?.length !== 0}
<div <div
class="shrink-0 rounded-full sm:hover:bg-white sm:hover:bg-opacity-[0.02] transition ease-out w-12 h-12 relative bg-default flex items-center justify-center" class="shrink-0 rounded-full sm:hover:bg-white/10 transition ease-out w-12 h-12 relative bg-default flex items-center justify-center"
> >
<label <label
for="addWatchListModal" for="addWatchListModal"

View File

@ -147,7 +147,7 @@
//==========================// //==========================//
$: { $: {
if ($stockTicker && typeof window !== "undefined") { if ($stockTicker) {
// add a check to see if running on client-side // add a check to see if running on client-side
if ($realtimePrice !== null && $realtimePrice !== 0) { if ($realtimePrice !== null && $realtimePrice !== 0) {
$currentPortfolioPrice = $realtimePrice; $currentPortfolioPrice = $realtimePrice;

View File

@ -499,8 +499,6 @@
} }
async function handleAddTicker(event, ticker) { async function handleAddTicker(event, ticker) {
event.preventDefault(); // Prevent the default form submission behavior
// Check if the ticker is already in the watchlist. // Check if the ticker is already in the watchlist.
if (watchList?.some((item) => item?.symbol === ticker)) { if (watchList?.some((item) => item?.symbol === ticker)) {
toast.error("This symbol is already in your watchlist"); toast.error("This symbol is already in your watchlist");
@ -534,7 +532,7 @@
}); });
// Use toast.promise to display notifications based on the promise's state. // Use toast.promise to display notifications based on the promise's state.
toast.promise(promise, { toast?.promise(promise, {
loading: "Updating watchlist...", loading: "Updating watchlist...",
success: "Watchlist updated successfully!", success: "Watchlist updated successfully!",
error: (err) => err.message || "Failed to update watchlist", error: (err) => err.message || "Failed to update watchlist",