Skip to content

Commit dc060b1

Browse files
perf(web): the new-thread link route compiles without manual memoization (#20597)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 66eee62 commit dc060b1

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎apps/web/src/routes/_chat.new.tsx‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { parseNewThreadLink } from "@t3tools/shared/promptLinks";
22
import { createFileRoute, useLocation } from "@tanstack/react-router";
3-
import { useMemo } from "react";
4-
53
import { NewThreadLinkView } from "../components/promptLinks/NewThreadLinkView";
64
import { Empty, EmptyDescription, EmptyHeader, EmptyTitle } from "../components/ui/empty";
75
import { SidebarInset } from "../components/ui/sidebar";
86

97
// The query is read raw: the router's own search parsing turns `prompt=123` into a number.
108
function NewThreadLinkRoute() {
119
const search = useLocation({ select: (location) => location.searchStr });
12-
const parsed = useMemo(() => parseNewThreadLink(search), [search]);
10+
const parsed = parseNewThreadLink(search);
1311
if (!parsed.ok) {
1412
return (
1513
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none">

0 commit comments

Comments
 (0)