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
+2 -2
View File
@@ -2,7 +2,7 @@ import { graphql, useStaticQuery } from "gatsby"
import React, { FC, HTMLAttributes } from "react"
import { IAllArchivesQuery, IFileOrFolder } from "../../types"
import { humanize } from "../../utils"
import { ColumnSidebar } from "../ColumnSidebar"
import { Sidebar } from "../Sidebar"
import useBuildTree from "./../../hooks/useBuildTree"
import * as SC from "./styles"
@@ -31,5 +31,5 @@ export const ArchivesSidebar: FC<HTMLAttributes<HTMLDivElement>> = props => {
const tree = useBuildTree(archives, "/archives")
const sortedTree = tree.sort((a, b) => a.title.localeCompare(b.title))
return <ColumnSidebar {...props}>{sortedTree.map(plantTree)}</ColumnSidebar>
return <Sidebar {...props}>{sortedTree.map(plantTree)}</Sidebar>
}