remove comments
This commit is contained in:
parent
9fc0562b61
commit
76509ea487
@ -36,11 +36,6 @@ export default function FolderTree(props) {
|
|||||||
defaultExpandIcon={<ChevronRightIcon />}
|
defaultExpandIcon={<ChevronRightIcon />}
|
||||||
onNodeSelect={(event, nodIds) => {
|
onNodeSelect={(event, nodIds) => {
|
||||||
const currentNode = binaryFind(props.flattenNodes, nodIds);
|
const currentNode = binaryFind(props.flattenNodes, nodIds);
|
||||||
// const currentNode = props.flattenNodes.find((aNode) => {
|
|
||||||
// console.log(aNode.id);
|
|
||||||
// return aNode.id === nodIds;
|
|
||||||
// });
|
|
||||||
console.log({ currentNode });
|
|
||||||
if (currentNode != null && currentNode.routePath != null) {
|
if (currentNode != null && currentNode.routePath != null) {
|
||||||
router.push(currentNode.routePath);
|
router.push(currentNode.routePath);
|
||||||
}
|
}
|
||||||
@ -60,16 +55,8 @@ function binaryFind(sourceList, valToFind) {
|
|||||||
while (rightIndex >= leftIndex) {
|
while (rightIndex >= leftIndex) {
|
||||||
middleIndex = leftIndex + Math.floor((rightIndex - leftIndex) / 2);
|
middleIndex = leftIndex + Math.floor((rightIndex - leftIndex) / 2);
|
||||||
const currentValue = sourceList[middleIndex];
|
const currentValue = sourceList[middleIndex];
|
||||||
console.log(currentValue);
|
|
||||||
// If the element is present at the middle
|
|
||||||
// itself
|
|
||||||
if (currentValue.id == valToFind) return currentValue;
|
if (currentValue.id == valToFind) return currentValue;
|
||||||
|
|
||||||
// If element is smaller than mid, then
|
|
||||||
// it can only be present in left subarray
|
|
||||||
if (currentValue.id > valToFind) rightIndex = middleIndex - 1;
|
if (currentValue.id > valToFind) rightIndex = middleIndex - 1;
|
||||||
// Else the element can only be present
|
|
||||||
// in right subarray
|
|
||||||
else leftIndex = middleIndex + 1;
|
else leftIndex = middleIndex + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
export const siteTitle = 'Digital Backroom - An Internet Archive'
|
export const siteTitle = "Digital Backroom - An Internet Archive";
|
||||||
export default function Layout({ children }) {
|
export default function Layout({ children }) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<main >
|
<main>{children}</main>
|
||||||
{children}
|
|
||||||
</main>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user