diff --git a/packages/client/src/layouts/router-header/Wiki.tsx b/packages/client/src/layouts/router-header/Wiki.tsx deleted file mode 100644 index 7a31349..0000000 --- a/packages/client/src/layouts/router-header/Wiki.tsx +++ /dev/null @@ -1,159 +0,0 @@ -import React from 'react'; -import { useRouter } from 'next/router'; -import Link from 'next/link'; -import { Avatar, Typography, Space, Dropdown } from '@douyinfe/semi-ui'; -import { IconChevronDown } from '@douyinfe/semi-icons'; -import { useStaredWikis, useWikiDetail } from 'data/wiki'; -import { Empty } from 'components/empty'; -import { DataRender } from 'components/data-render'; -import { WikiStar } from 'components/wiki/star'; -import { Placeholder } from './placeholder'; -import styles from './index.module.scss'; - -const { Text } = Typography; - -export const Wiki = () => { - const { query } = useRouter(); - const { data: starWikis, loading, error, refresh: refreshStarWikis } = useStaredWikis(); - const { data: currentWiki } = useWikiDetail(query.wikiId); - - return ( - - {currentWiki && ( - <> -
- - 当前 - -
-
- - -
- - {currentWiki.name.charAt(0)} - -
- - {currentWiki.name} - -
-
-
- -
-
- -
- - )} -
- - 已收藏 - -
- } - error={error} - normalContent={() => { - return ( -
- {starWikis.length ? ( - starWikis.map((wiki) => { - return ( -
- - -
- - {wiki.name.charAt(0)} - -
- - {wiki.name} - -
-
-
- -
-
- -
- ); - }) - ) : ( - - )} -
- ); - }} - /> - -
- - - 查看所有知识库 - - -
- - } - > - - - 知识库 - - - -
- ); -};