The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 25, 17:15 UTC
simp
Julius Marminge committed
Feb 18, 2026 at 23:02 UTC
85085491da415786b4d16c1942ec74a97c21958e
1 file changed
+4
-12
apps/web/src/components/ui/toast.tsx
+4
-12
@@ -2,7 +2,7 @@
2
3
import { Toast } from "@base-ui/react/toast";
4
import { useEffect } from "react";
5
-import { useRouterState } from "@tanstack/react-router";
5
+import { useParams } from "@tanstack/react-router";
6
import {
7
CircleAlertIcon,
8
CircleCheckIcon,
@@ -56,17 +56,9 @@ function shouldRenderForActiveThread(
56
}
57
58
function useActiveThreadIdFromRoute(): string | null {
59
- return useRouterState({
60
- select: (routerState) => {
61
- for (let index = routerState.matches.length - 1; index >= 0; index -= 1) {
62
- const params = routerState.matches[index]?.params as Record<string, unknown> | undefined;
63
- const threadId = params?.threadId;
64
- if (typeof threadId === "string" && threadId.length > 0) {
65
- return threadId;
66
- }
67
- }
68
- return null;
69
- },
59
+ return useParams({
60
+ strict: false,
61
+ select: (params) => params.threadId ?? null,
62
});
63
}
64