refactor(components): show displayName in react profiler correctly

This commit is contained in:
moklick
2020-07-27 18:50:53 +02:00
parent 05786fcee6
commit 30e811225a
15 changed files with 643 additions and 649 deletions
@@ -10,7 +10,7 @@ interface MiniMapNodeProps {
style?: CSSProperties;
}
const MiniMapNode = memo(({ x, y, width, height, style, color, borderRadius }: MiniMapNodeProps) => {
const MiniMapNode = ({ x, y, width, height, style, color, borderRadius }: MiniMapNodeProps) => {
const { background, backgroundColor } = style || {};
const fill = (color || background || backgroundColor) as string;
@@ -26,8 +26,8 @@ const MiniMapNode = memo(({ x, y, width, height, style, color, borderRadius }: M
fill={fill}
/>
);
});
};
MiniMapNode.displayName = 'MiniMapNode';
export default MiniMapNode;
export default memo(MiniMapNode);