Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if(selected.children[0].subtitle === 'BottomTab')
return `${image}/Tab-Drawer/${selected.children.length}TabDrawer.png`;
return populateImg(image, selected.children[0])
}
case 'Simple Screen':
// if(selected.children && selected.children.length)
// return `${image}/Screen/${selected.children.length}screen.png`;
//trying to get the parent so i can access the children.length on the tree
//selected.path === [0, 1];
console.log('case ss: path',
treeData,
selected,
getNodeAtPath({
treeData,
path: selected.path.slice(0, selected.path.length),
getNodeKey: selected.key,
ignoreCollapsed
})
);
case 'Stack':
break;
case 'Switch':
return image += 'switch.png';
default:
return image += 'default.png'
}