Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

simp

Julius Marminge85085491da41
diff --git a/apps/web/src/components/ui/toast.tsx b/apps/web/src/components/ui/toast.tsx
index a8df9d0ac..7e75d0d0c 100644
--- a/apps/web/src/components/ui/toast.tsx
+++ b/apps/web/src/components/ui/toast.tsx
@@ -2,7 +2,7 @@
import { Toast } from "@base-ui/react/toast";
import { useEffect } from "react";
-import { useRouterState } from "@tanstack/react-router";
+import { useParams } from "@tanstack/react-router";
import {
CircleAlertIcon,
CircleCheckIcon,
@@ -56,17 +56,9 @@ function shouldRenderForActiveThread(
}
function useActiveThreadIdFromRoute(): string | null {
- return useRouterState({
- select: (routerState) => {
- for (let index = routerState.matches.length - 1; index >= 0; index -= 1) {
- const params = routerState.matches[index]?.params as Record<string, unknown> | undefined;
- const threadId = params?.threadId;
- if (typeof threadId === "string" && threadId.length > 0) {
- return threadId;
- }
- }
- return null;
- },
+ return useParams({
+ strict: false,
+ select: (params) => params.threadId ?? null,
});
}