mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-06 07:56:11 +02:00
feat(resources): support topics + languages in sidebar
This commit is contained in:
@@ -2,10 +2,10 @@ import { IAllFilesQuery, IFileQuery } from "../types"
|
||||
import { join, traversePaths } from "../utils"
|
||||
|
||||
export default function useBuildTree(
|
||||
resources: IAllFilesQuery,
|
||||
resources: IAllFilesQuery["allFile"],
|
||||
basePath: string
|
||||
) {
|
||||
const objects = resources.allFile.edges.map(({ node: file }: IFileQuery) =>
|
||||
const objects = resources.edges.map(({ node: file }: IFileQuery) =>
|
||||
traversePaths(file.relativePath.split("/"), basePath)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user