feat: add some folders

This commit is contained in:
crazywoola
2023-06-13 20:59:07 +08:00
parent 008205ab3e
commit 00719abb5d
9 changed files with 43 additions and 6 deletions
+2
View File
@@ -0,0 +1,2 @@
# you can find this in https://cloud.dify.ai/
API_SECRET=YOUR_API_SECRET
+2
View File
@@ -33,3 +33,5 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
.env
+6
View File
@@ -0,0 +1,6 @@
const Content = async () => {
await new Promise((resolve) => setTimeout(resolve, 1000))
return <div className=''>Content</div>
}
export default Content
+6
View File
@@ -0,0 +1,6 @@
const Sidebar = async () => {
await new Promise((resolve) => setTimeout(resolve, 2000))
return <div>Sidebar</div>
}
export default Sidebar
View File
+18
View File
@@ -0,0 +1,18 @@
import styles from './style.module.scss'
import { Suspense } from 'react'
import Loading from '../loading'
export default function Layout(props: {
sidebar: React.ReactNode
content: React.ReactNode
}) {
return (
<main className={styles.main}>
<div className={styles.sidebar_wrapper}>
<Suspense fallback={<Loading />}>{props.sidebar}</Suspense>
</div>
<div className={styles.content_wrapper}>
<Suspense fallback={<Loading />}>{props.content}</Suspense>
</div>
</main>
)
}
-6
View File
@@ -1,6 +0,0 @@
const Home = async () => {
await new Promise((resolve) => setTimeout(resolve, 1000))
return <main className='flex min-h-screen flex-col items-center justify-between p-24'>Chat</main>
}
export default Home
+9
View File
@@ -0,0 +1,9 @@
.main {
@apply flex;
.sidebar_wrapper {
@apply flex w-40 md:w-32 lg:w-40 shrink-0;
}
.content_wrapper {
@apply flex w-full;
}
}