-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
91 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,3 +43,4 @@ build | |
.vercel | ||
.dumi | ||
.next | ||
/public/docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ nav: | |
order: 999 | ||
--- | ||
|
||
<embed src="../CHANGELOG.md"></embed> | ||
<embed src="../../CHANGELOG.md"></embed> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "docs", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"build": "dumi build", | ||
"dev": "PORT=8110 dumi dev" | ||
}, | ||
"devDependencies": { | ||
"babel-plugin-antd-style": "^1.0.4", | ||
"dumi": "^2", | ||
"dumi-theme-lobehub": "latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "CommonJS", | ||
"target": "ES5", | ||
"lib": ["esnext", "DOM"], | ||
"sourceMap": true, | ||
"skipDefaultLibCheck": true, | ||
"jsx": "react-jsx", | ||
"baseUrl": ".", | ||
"allowSyntheticDefaultImports": true, | ||
"moduleResolution": "node", | ||
"forceConsistentCasingInFileNames": true, | ||
"noImplicitReturns": true, | ||
"noUnusedLocals": true, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"paths": { | ||
"@@/*": ["./dumi/tmp/*"], | ||
"@/*": ["../src/*"] | ||
}, | ||
"noEmit": true, | ||
"incremental": true, | ||
"esModuleInterop": true, | ||
"isolatedModules": true | ||
}, | ||
"exclude": ["node_modules"], | ||
"include": [".", ".dumi/**/*", ".dumirc.ts", "../src"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
packages: | ||
- 'docs' | ||
- . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { fetchPluginMessage } from '@lobehub/chat-plugin-sdk'; | ||
import { Skeleton } from 'antd'; | ||
import { memo } from 'react'; | ||
import useSWR from 'swr'; | ||
|
||
import Render from '@/Render'; | ||
import { WeatherResult } from '@/type'; | ||
|
||
const Home = memo(() => { | ||
const { isLoading, data } = useSWR<WeatherResult>('fetchDataFromChat', fetchPluginMessage); | ||
|
||
return isLoading || !data ? <Skeleton active /> : <Render content={data} name={'test'} />; | ||
}); | ||
|
||
export default Home; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
import { fetchPluginMessage } from '@lobehub/chat-plugin-sdk'; | ||
import { Skeleton } from 'antd'; | ||
import { memo } from 'react'; | ||
import useSWR from 'swr'; | ||
import { useRouter } from 'next/router'; | ||
import { useEffect } from 'react'; | ||
|
||
import Render from '@/Render'; | ||
import { WeatherResult } from '@/type'; | ||
export default () => { | ||
const router = useRouter(); | ||
|
||
const Home = memo(() => { | ||
const { isLoading, data } = useSWR<WeatherResult>('fetchDataFromChat', fetchPluginMessage); | ||
useEffect(() => { | ||
router.replace('/docs'); | ||
}, []); | ||
|
||
return isLoading || !data ? <Skeleton active /> : <Render content={data} name={'test'} />; | ||
}); | ||
|
||
export default Home; | ||
return null; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters