-
{n.title}
-
{n.message}
-
+
{n.title}
+
{n.message}
+
{new Date(n.createdAt).toLocaleString()}
@@ -116,7 +116,7 @@ const NotificationsPanel: React.FC<{ id: string; onClose: () => void }> = ({
type="button"
aria-label={`Mark notification "${n.title}" as read`}
onClick={() => markAsRead(n.id)}
- className="shrink-0 p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#2C4BFD] focus-visible:ring-offset-2 dark:focus-visible:ring-offset-gray-900"
+ className="shrink-0 p-2 rounded-lg hover:bg-white/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#2C4BFD] focus-visible:ring-offset-2 focus-visible:ring-offset-[#111827]"
>
diff --git a/src/components/PredictionHistory.tsx b/src/components/PredictionHistory.tsx
index b8a323b..02ec491 100644
--- a/src/components/PredictionHistory.tsx
+++ b/src/components/PredictionHistory.tsx
@@ -82,6 +82,7 @@ export default function PredictionHistory({ userId, optimisticPrediction }: Pred
}, [history, userId]);
useEffect(() => {
+ // eslint-disable-next-line react-hooks/set-state-in-effect
void loadHistory();
}, [loadHistory]);
diff --git a/src/components/PriceChart.tsx b/src/components/PriceChart.tsx
index 8f6cdc7..11f3ec4 100644
--- a/src/components/PriceChart.tsx
+++ b/src/components/PriceChart.tsx
@@ -487,6 +487,7 @@ const PriceChart = ({ height = 300, asset = "XLM", entryPrice, onPriceUpdate }:
// Reload data when asset changes — reset and load mock/API data
useEffect(() => {
+ /* eslint-disable react-hooks/set-state-in-effect */
setData([]);
setIsLoading(true);
setLoadError(null);
@@ -499,8 +500,8 @@ const PriceChart = ({ height = 300, asset = "XLM", entryPrice, onPriceUpdate }:
setIsLoading(false);
}
- // Also attempt to fetch live data from API
void loadInitialPrices();
+ /* eslint-enable react-hooks/set-state-in-effect */
}, [asset]); // eslint-disable-line react-hooks/exhaustive-deps
// Update chart line color when asset changes
diff --git a/src/pages/Dashboard.tsx b/src/pages/Dashboard.tsx
index 7b3bcb4..c5fd2c2 100644
--- a/src/pages/Dashboard.tsx
+++ b/src/pages/Dashboard.tsx
@@ -181,7 +181,9 @@ const activeRoundId = useRoundStore((state) => state.activeRound?.id ?? null);
// Clear the entry marker whenever the active round changes.
useEffect(() => {
+ /* eslint-disable react-hooks/set-state-in-effect */
setEntryPrice(null);
+ /* eslint-enable react-hooks/set-state-in-effect */
}, [activeRoundId]);
const [stats, setStats] = useState
(null);
@@ -283,8 +285,10 @@ const activeRoundId = useRoundStore((state) => state.activeRound?.id ?? null);
}, [isWalletConnected, publicKey]);
useEffect(() => {
+ /* eslint-disable react-hooks/set-state-in-effect */
void fetchStats();
void fetchActivities();
+ /* eslint-enable react-hooks/set-state-in-effect */
}, [fetchStats, fetchActivities]);
const refreshInspector = useCallback(async () => {
@@ -309,7 +313,9 @@ const activeRoundId = useRoundStore((state) => state.activeRound?.id ?? null);
}, [isWalletConnected, publicKey]);
useEffect(() => {
+ /* eslint-disable react-hooks/set-state-in-effect */
void refreshInspector();
+ /* eslint-enable react-hooks/set-state-in-effect */
}, [refreshInspector]);
const handleRoundSoundToggle = (enabled: boolean) => {
diff --git a/src/pages/Learn.tsx b/src/pages/Learn.tsx
index 6def81f..3b49617 100644
--- a/src/pages/Learn.tsx
+++ b/src/pages/Learn.tsx
@@ -52,7 +52,9 @@ const LearnPage = () => {
}, []);
useEffect(() => {
+ /* eslint-disable react-hooks/set-state-in-effect */
fetchData();
+ /* eslint-enable react-hooks/set-state-in-effect */
}, [fetchData]);
if (loading) {