Skip to content

Commit 6a4df0b

Browse files
perf(web): file entry icons compile without manual memoization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 70d60e0 commit 6a4df0b

2 files changed

Lines changed: 3 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/chat/PierreEntryIcon.tsx",
99100
] as const;

‎apps/web/src/components/chat/PierreEntryIcon.tsx‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { FileIcon, FolderIcon } from "lucide-react";
2-
import { memo, useInsertionEffect, useMemo } from "react";
2+
import { memo, useInsertionEffect } from "react";
33

44
import { ensurePierreIconSprite, resolvePierreIconForEntry } from "../../pierre-icons";
55
import { cn } from "~/lib/utils";
@@ -67,10 +67,7 @@ export const PierreEntryIcon = memo(function PierreEntryIcon(props: {
6767
className?: string;
6868
}) {
6969
useInsertionEffect(ensurePierreIconSprite, []);
70-
const icon = useMemo(
71-
() => resolvePierreIconForEntry(props.pathValue, props.kind, props.mimeType),
72-
[props.kind, props.pathValue, props.mimeType],
73-
);
70+
const icon = resolvePierreIconForEntry(props.pathValue, props.kind, props.mimeType);
7471

7572
if (!icon) {
7673
return props.kind === "directory" ? (

0 commit comments

Comments
 (0)