TypeScript
perf(web): the guide stop compiles without manual memoization (#20560)
Julius Marminge1e42057c97ba
diff --git a/apps/web/src/components/pullRequest/guide/GuideStop.tsx b/apps/web/src/components/pullRequest/guide/GuideStop.tsxindex 9e4795e1528..cc7557d3bb3 100644--- a/apps/web/src/components/pullRequest/guide/GuideStop.tsx+++ b/apps/web/src/components/pullRequest/guide/GuideStop.tsx@@ -13,7 +13,7 @@ import {MessageCircleQuestionIcon,MessageSquareIcon,} from "lucide-react";-import { useMemo, type ReactNode } from "react";+import type { ReactNode } from "react";import { getDiffLineStat } from "~/lib/diffRendering";import { cn } from "~/lib/utils";@@ -71,7 +71,7 @@ export function GuideStop({onFinish: (() => void) | null;onOpenFile: (path: string) => void;}) {- const { lettered, byExcerpt } = useMemo(() => letterStopNotes(stop), [stop]);+ const { lettered, byExcerpt } = letterStopNotes(stop);const excerptPaths = new Set(stop.excerpts.map((excerpt) => excerpt.path));const otherFiles = stop.files.filter((file) => !excerptPaths.has(file.path));