refact: rename Column components to be generic

This commit is contained in:
Jean-Philippe Sirois
2019-11-11 17:18:09 -08:00
parent ba88927304
commit 711da3c517
25 changed files with 553 additions and 555 deletions
+3 -3
View File
@@ -3,7 +3,7 @@ import React, { FC, HTMLAttributes, memo, useState } from "react"
import TriangleDown from "../../icons/triangle-down.svg"
import { IAllResourcesQuery, IFileOrFolder, IFolder } from "../../types"
import { humanize } from "../../utils"
import { ColumnSidebar } from "../ColumnSidebar"
import { Sidebar } from "../Sidebar"
import useBuildTree from "./../../hooks/useBuildTree"
import useSidebar from "./../../hooks/useSidebar"
import * as SC from "./styles"
@@ -96,8 +96,8 @@ export const ResourcesSidebar: FC<HTMLAttributes<HTMLDivElement>> = props => {
const sortedTree = tree.sort((a, b) => a.title.localeCompare(b.title))
return (
<ColumnSidebar {...props}>
<Sidebar {...props}>
{sortedTree.map((node, index) => plantTree(node, index, true))}
</ColumnSidebar>
</Sidebar>
)
}