add folders and file listing api

This commit is contained in:
spencerwooo
2021-06-23 00:15:19 +01:00
parent 1d64271aaa
commit bada403a9d
8 changed files with 176 additions and 5943 deletions
+7 -3
View File
@@ -1,6 +1,6 @@
import Head from 'next/head'
import Image from 'next/image'
import { useRouter } from 'next/router'
import Link from 'next/link'
import siteConfig from '../config/site.json'
import Navbar from '../components/Navbar'
@@ -8,7 +8,7 @@ import FileListing from '../components/FileListing'
import Footer from '../components/Footer'
export default function Folders() {
const { query } = useRouter()
const { asPath } = useRouter()
return (
<div className="flex flex-col items-center justify-center min-h-screen">
@@ -19,7 +19,11 @@ export default function Folders() {
<main className="flex flex-col w-full flex-1 bg-gray-50">
<Navbar />
<div className="mx-auto w-full max-w-4xl">
<FileListing query={query} />
<div className="py-3 text-sm text-gray-600">
<Link href="/">🚩 Home </Link>
{decodeURIComponent(asPath)}
</div>
<FileListing path={asPath} />
</div>
</main>