chore: reorganize docs apps (#7228)
* reorganize docs apps * add README * fix directory * add condition for old docs
This commit is contained in:
1 parent
224ebb2154
commit
4fe28f5a95
6187 files changed
+601447
-598226
No files matched your search
@@ -0,0 +1,22 @@
|
||||
"use client"
|
||||
|
||||
import { usePathname } from "next/navigation"
|
||||
import { useMemo } from "react"
|
||||
import { EditButton as UiEditButton } from "docs-ui"
|
||||
import { filesMap } from "../../generated/files-map.mjs"
|
||||
|
||||
const EditButton = () => {
|
||||
const pathname = usePathname()
|
||||
const filePath = useMemo(
|
||||
() => filesMap.find((file) => file.pathname === pathname),
|
||||
[pathname]
|
||||
)
|
||||
|
||||
if (!filePath) {
|
||||
return <></>
|
||||
}
|
||||
|
||||
return <UiEditButton filePath={filePath.filePath} />
|
||||
}
|
||||
|
||||
export default EditButton
|
||||
Reference in new issue
Block a user