mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 17:25:59 +02:00
feat(archives): bootstrap what-is-archives from Github
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { IAllFilesQuery, IFileQuery } from "../types"
|
||||
import { join, traversePaths } from "../utils"
|
||||
|
||||
export default function useBuildTree(
|
||||
resources: IAllFilesQuery,
|
||||
basePath: string
|
||||
) {
|
||||
const objects = resources.allFile.edges.map(({ node: file }: IFileQuery) =>
|
||||
traversePaths(file.relativePath.split("/"), basePath)
|
||||
)
|
||||
|
||||
return join(objects)
|
||||
}
|
||||
Reference in New Issue
Block a user