diff --git a/packages/client/src/pages/index.tsx b/packages/client/src/pages/index.tsx index f58cbfa8..3224f970 100644 --- a/packages/client/src/pages/index.tsx +++ b/packages/client/src/pages/index.tsx @@ -2,7 +2,7 @@ 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 { Typography, Button, Table, List, Avatar } from '@douyinfe/semi-ui'; import { useToggle } from 'hooks/use-toggle'; import { Seo } from 'components/seo'; import { DataRender } from 'components/data-render'; @@ -37,6 +37,7 @@ const RecentDocs = () => { title="标题" dataIndex="title" key="title" + width={200} render={(_, document: IDocument) => { return ( @@ -46,6 +47,21 @@ const RecentDocs = () => { }} />, , + { + return ( +
+ + {createUser.name.slice(0, 1)} + + {createUser.name} +
+ ); + }} + />, instanceToPlain(doc)); + query.take(20); + + const documentIds = await (await query.getMany()).map((docAuth) => docAuth.documentId); + const documents = await this.documentRepo.findByIds(documentIds, { order: { updatedAt: 'DESC' } }); + const docs = documents.filter((doc) => !doc.isWikiHome).map((doc) => instanceToPlain(doc)); const res = await Promise.all( docs.map(async (doc) => {