diff --git a/frontend/src/components/dashboard/dashboard-view.tsx b/frontend/src/components/dashboard/dashboard-view.tsx index e0a921e3..d6c6eb2c 100644 --- a/frontend/src/components/dashboard/dashboard-view.tsx +++ b/frontend/src/components/dashboard/dashboard-view.tsx @@ -18,6 +18,8 @@ import toast from "react-hot-toast"; import { getDashboardAnalytics, fetchDashboardData, + useDashboard, + dashboardQueryKey, type DashboardSnapshot, type Stream, } from "@/lib/dashboard"; @@ -505,6 +507,7 @@ function renderRecentActivity( // ─── Main Component ─────────────────────────────────────────────────────────── export function DashboardView({ session, onDisconnect }: DashboardViewProps) { + const queryClient = useQueryClient(); const [activeTab, setActiveTab] = React.useState("overview"); const [showWizard, setShowWizard] = React.useState(false); const [modal, setModal] = React.useState(null); @@ -551,7 +554,7 @@ export function DashboardView({ session, onDisconnect }: DashboardViewProps) { } } } - }, [streamEvents, session.publicKey]); + }, [streamEvents, session.publicKey, queryClient]); const [streamForm, setStreamForm] = React.useState(EMPTY_STREAM_FORM); @@ -762,7 +765,7 @@ export function DashboardView({ session, onDisconnect }: DashboardViewProps) { // ── Optimistic helpers ──────────────────────────────────────────────────── const removeStreamLocally = (streamId: string) => { - setSnapshot((prev) => { + queryClient.setQueryData(dashboardQueryKey(session.publicKey), (prev) => { if (!prev) return prev; return { ...prev, diff --git a/frontend/src/components/stream-creation/TokenStep.tsx b/frontend/src/components/stream-creation/TokenStep.tsx index 3caf8675..1ef5d97b 100644 --- a/frontend/src/components/stream-creation/TokenStep.tsx +++ b/frontend/src/components/stream-creation/TokenStep.tsx @@ -21,19 +21,26 @@ export const TokenStep: React.FC = ({ return (
-

Select Token

+

Select Token

Choose the token you want to stream to the recipient.

-
+
{TOKENS.map((token) => { const isSelected = value === token.id; return (