import type { NextPage } from 'next'; import type { IDocument } from '@think/domains'; import Link from 'next/link'; import React, { useMemo } from 'react'; import { Typography, Button, Table, List } from '@douyinfe/semi-ui'; import { useToggle } from 'hooks/use-toggle'; import { Seo } from 'components/seo'; import { DataRender } from 'components/data-render'; import { SingleColumnLayout } from 'layouts/single-column'; import { WikiCreator } from 'components/wiki/create'; import { LocaleTime } from 'components/locale-time'; import { DocumentActions } from 'components/document/actions'; import { useStaredWikis } from 'data/wiki'; import { useRecentDocuments } from 'data/document'; import { WikiPinCardPlaceholder, WikiPinCard } from 'components/wiki/pin-card'; import { Empty } from 'components/empty'; import styles from './index.module.scss'; const { Title } = Typography; const { Column } = Table; const grid = { gutter: 16, xs: 24, sm: 12, md: 12, lg: 8, xl: 8, }; const RecentDocs = () => { const { data, error, loading, refresh } = useRecentDocuments(); const columns = useMemo( () => [ { return ( {document.title} ); }} />, , } />, ( )} />, ], [] ); return ( <> 最近访问 {columns} } error={error} normalContent={() => data && data.length ? ( {columns}
) : ( ) } /> ); }; const Page: NextPage = () => { const [visible, toggleVisible] = useToggle(false); const { data: staredWikis, loading, error } = useStaredWikis(); return (
快捷访问 <>
( ( )} /> )} error={error} normalContent={() => ( ( )} emptyContent={} /> )} />
); }; export default Page;