Skip to content

Commit efae829

Browse files
committed
removed broken code, and hiearchy components from ComponentMap.tsx
1 parent 2ffab44 commit efae829

File tree

1 file changed

+0
-47
lines changed

1 file changed

+0
-47
lines changed

src/app/components/ComponentMap.tsx

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,6 @@ import { useStoreContext } from '../store';
2323

2424
const exclude = ['childExpirationTime', 'staticContext', '_debugSource', 'actualDuration', 'actualStartTime', 'treeBaseDuration', '_debugID', '_debugIsCurrentlyTiming', 'selfBaseDuration', 'expirationTime', 'effectTag', 'alternate', '_owner', '_store', 'get key', 'ref', '_self', '_source', 'firstBaseUpdate', 'updateQueue', 'lastBaseUpdate', 'shared', 'responders', 'pending', 'lanes', 'childLanes', 'effects', 'memoizedState', 'pendingProps', 'lastEffect', 'firstEffect', 'tag', 'baseState', 'baseQueue', 'dependencies', 'Consumer', 'context', '_currentRenderer', '_currentRenderer2', 'mode', 'flags', 'nextEffect', 'sibling', 'create', 'deps', 'next', 'destroy', 'parentSub', 'child', 'key', 'return', 'children', '$$typeof', '_threadCount', '_calculateChangedBits', '_currentValue', '_currentValue2', 'Provider', '_context', 'stateNode', 'elementType', 'type'];
2525

26-
// const root = hierarchy({
27-
// name: 'root',
28-
// children: [
29-
// { name: 'child #1' },
30-
// {
31-
// name: 'child #2',
32-
// children: [
33-
// { name: 'grandchild #1' },
34-
// { name: 'grandchild #2' },
35-
// { name: 'grandchild #3' },
36-
// ],
37-
// },
38-
// ],
39-
// });
40-
41-
interface TreeNode {
42-
name: string;
43-
isExpanded?: boolean;
44-
children?: TreeNode[];
45-
}
46-
47-
// type HierarchyNode = HierarchyPointNode<TreeNode>;
48-
4926
const defaultMargin = {
5027
top: 30, left: 30, right: 55, bottom: 70,
5128
};
@@ -174,30 +151,6 @@ export default function ComponentMap({
174151

175152
const formatState = state => {
176153
if (state === 'stateless') return ['stateless'];
177-
// Something in this code below is breaking the app,
178-
// when you hover over a stateful component on the map
179-
// --------------------------------------------------------------------------------------------
180-
// const result = [];
181-
// const inner = arg => {
182-
// if (Array.isArray(arg)) {
183-
// result.push('[');
184-
// arg.forEach(e => { inner(e); });
185-
// result.push('] ');
186-
// } else if ((typeof arg) === 'object') {
187-
// result.push('{ ');
188-
// Object.keys(arg).forEach((key, i, arr) => {
189-
// result.push(`${key}: `);
190-
// ((typeof arg[key]) === 'object') ? inner(arg[key]) : result.push(arg[key]);
191-
// if (i !== arr.length - 1) result.push(', ');
192-
// });
193-
// result.push(' } ');
194-
// } else {
195-
// result.push(` ${arg}, `);
196-
// }
197-
// };
198-
// inner(state);
199-
// return result;
200-
// --------------------------------------------------------------------------------------------
201154
return ['stateful'];
202155
};
203156

0 commit comments

Comments
 (0)