Skip to content

Commit 6aa52cd

Browse files
perf(web): the CSV table preview compiles without manual memoization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 70d60e0 commit 6aa52cd

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

‎apps/web/reactCompiledFiles.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,5 @@ export const REACT_COMPILED_FILES = [
9696
"apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx",
9797
"apps/web/src/components/ThreadTerminalDrawer.tsx",
9898
"apps/web/src/components/settings/SettingsPanels.tsx",
99+
"apps/web/src/components/files/DelimitedTablePreview.tsx",
99100
] as const;

‎apps/web/src/components/files/DelimitedTablePreview.tsx‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* oxlint-disable react/no-array-index-key -- Table rows and columns have stable positions and may contain identical values. */
22
import { parseDelimitedPreview } from "@t3tools/shared/delimitedPreview";
3-
import { useMemo } from "react";
43

54
import { FileSurfaceNotice } from "./fileSurfaceChrome";
65

@@ -9,10 +8,7 @@ export function DelimitedTablePreview(props: {
98
readonly text: string;
109
readonly delimiter: "," | "\t";
1110
}) {
12-
const table = useMemo(
13-
() => parseDelimitedPreview(props.text, props.delimiter),
14-
[props.text, props.delimiter],
15-
);
11+
const table = parseDelimitedPreview(props.text, props.delimiter);
1612
const [header, ...body] = table.rows;
1713
return (
1814
<div className="flex min-h-0 flex-1 flex-col">

0 commit comments

Comments
 (0)