jam411 3 лет назад
Родитель
Сommit
b8538612a2

+ 9 - 1
packages/app/src/components/PageList/BookmarkList.tsx

@@ -4,6 +4,7 @@ import { useTranslation } from 'next-i18next';
 
 import { toastError } from '~/client/util/apiNotification';
 import { apiv3Get } from '~/client/util/apiv3-client';
+import { IPageHasId } from '~/interfaces/page';
 import loggerFactory from '~/utils/logger';
 
 import PaginationWrapper from '../PaginationWrapper';
@@ -17,11 +18,18 @@ type BookmarkListProps = {
   userId: string
 }
 
+type BookmarkListPages = {
+  _id: string,
+  page: IPageHasId,
+  user: string,
+  createdAt: Date,
+}
+
 export const BookmarkList = (props: BookmarkListProps): JSX.Element => {
   const { userId } = props;
 
   const { t } = useTranslation();
-  const [pages, setPages] = useState<any>([]);
+  const [pages, setPages] = useState<BookmarkListPages[]>([]);
 
   const [activePage, setActivePage] = useState(1);
   const [totalItemsCount, setTotalItemsCount] = useState(0);

+ 3 - 1
packages/app/src/components/PageList/PageListItemS.tsx

@@ -2,9 +2,11 @@ import React from 'react';
 
 import { UserPicture, PageListMeta, PagePathLabel } from '@growi/ui';
 
+import { IPageHasId } from '~/interfaces/page';
+
 
 type PageListItemSProps = {
-  page: any,
+  page: IPageHasId,
   noLink?: boolean,
 }