Skip to content

Commit 0c27cc3

Browse files
committed
fix: Component definition is missing display name
1 parent 73cd4bb commit 0c27cc3

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

packages/vscode-js-profile-core/src/cpu/layout.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ type CpuProfileLayoutComponent<T> = FunctionComponent<{
2020
/**
2121
* Base layout component to display CPU-profile related info.
2222
*/
23-
export const cpuProfileLayoutFactory =
24-
<T extends {}>(): CpuProfileLayoutComponent<T> =>
25-
({ data, body: RowBody, filterFooter: FilterFooter }) => {
23+
export const cpuProfileLayoutFactory = <T extends {}>(): CpuProfileLayoutComponent<T> => {
24+
const CpuProfileLayout: CpuProfileLayoutComponent<T> = ({
25+
data,
26+
body: RowBody,
27+
filterFooter: FilterFooter,
28+
}) => {
2629
const RichFilter = useMemo<RichFilterComponent<T>>(richFilter, []);
2730
const [filteredData, setFilteredData] = useState<IQueryResults<T> | undefined>(undefined);
2831
const footer = useMemo(
@@ -50,3 +53,5 @@ export const cpuProfileLayoutFactory =
5053
</Fragment>
5154
);
5255
};
56+
return CpuProfileLayout;
57+
};

packages/vscode-js-profile-core/src/heap/layout.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ type HeapProfileLayoutComponent<T> = FunctionComponent<{
2020
/**
2121
* Base layout component to display CPU-profile related info.
2222
*/
23-
export const heapProfileLayoutFactory =
24-
<T extends {}>(): HeapProfileLayoutComponent<T> =>
25-
({ data, body: RowBody, filterFooter: FilterFooter }) => {
23+
export const heapProfileLayoutFactory = <T extends {}>(): HeapProfileLayoutComponent<T> => {
24+
const HeapProfileLayout: HeapProfileLayoutComponent<T> = ({
25+
data,
26+
body: RowBody,
27+
filterFooter: FilterFooter,
28+
}) => {
2629
const RichFilter = useMemo<RichFilterComponent<T>>(richFilter, []);
2730
const [filteredData, setFilteredData] = useState<IQueryResults<T> | undefined>(undefined);
2831
const footer = useMemo(
@@ -50,3 +53,5 @@ export const heapProfileLayoutFactory =
5053
</Fragment>
5154
);
5255
};
56+
return HeapProfileLayout;
57+
};

0 commit comments

Comments
 (0)