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

+ 2 - 1
packages/app/src/components/Navbar/GrowiContextualSubNavigation.tsx

@@ -1,6 +1,5 @@
 import React, { useState, useEffect, useCallback } from 'react';
 import React, { useState, useEffect, useCallback } from 'react';
 
 
-
 import { isPopulated } from '@growi/core';
 import { isPopulated } from '@growi/core';
 import { useTranslation } from 'next-i18next';
 import { useTranslation } from 'next-i18next';
 import dynamic from 'next/dynamic';
 import dynamic from 'next/dynamic';
@@ -40,6 +39,8 @@ import { Skelton } from '../Skelton';
 import { GrowiSubNavigation } from './GrowiSubNavigation';
 import { GrowiSubNavigation } from './GrowiSubNavigation';
 import { SubNavButtonsProps } from './SubNavButtons';
 import { SubNavButtonsProps } from './SubNavButtons';
 
 
+import { IResTagsUpdateApiv1 } from '~interfaces/tag';
+
 import PageEditorModeManagerStyles from './PageEditorModeManager.module.scss';
 import PageEditorModeManagerStyles from './PageEditorModeManager.module.scss';
 
 
 
 

+ 5 - 3
packages/app/src/components/RecentCreated/RecentCreated.tsx

@@ -2,6 +2,7 @@ import React, { useState, useCallback } from 'react';
 
 
 import { toastError } from '~/client/util/apiNotification';
 import { toastError } from '~/client/util/apiNotification';
 import { apiv3Get } from '~/client/util/apiv3-client';
 import { apiv3Get } from '~/client/util/apiv3-client';
+import { IPageHasId } from '~/interfaces/page';
 import loggerFactory from '~/utils/logger';
 import loggerFactory from '~/utils/logger';
 
 
 import PageListItemS from '../PageList/PageListItemS';
 import PageListItemS from '../PageList/PageListItemS';
@@ -14,13 +15,14 @@ type RecentCreatedProps = {
 }
 }
 
 
 export const RecentCreated = (props: RecentCreatedProps): JSX.Element => {
 export const RecentCreated = (props: RecentCreatedProps): JSX.Element => {
+
   const { userId } = props;
   const { userId } = props;
-  const [pages, setPages] = useState<any>([]);
+
+  const [pages, setPages] = useState<IPageHasId[]>([]);
   const [activePage, setActivePage] = useState(1);
   const [activePage, setActivePage] = useState(1);
   const [totalPages, setTotalPages] = useState(0);
   const [totalPages, setTotalPages] = useState(0);
   const [pagingLimit, setPagingLimit] = useState(10);
   const [pagingLimit, setPagingLimit] = useState(10);
 
 
-
   const getMyRecentCreatedList = useCallback(async(selectedPage) => {
   const getMyRecentCreatedList = useCallback(async(selectedPage) => {
     const page = selectedPage;
     const page = selectedPage;
 
 
@@ -35,7 +37,7 @@ export const RecentCreated = (props: RecentCreatedProps): JSX.Element => {
     }
     }
     catch (error) {
     catch (error) {
       logger.error('failed to fetch data', error);
       logger.error('failed to fetch data', error);
-      toastError(error, 'Error occurred in bookmark page list');
+      toastError(error, 'Error occurred in recent created page list');
     }
     }
   }, [userId]);
   }, [userId]);
 
 

+ 9 - 0
packages/app/src/components/UsersHomePageFooter.module.scss

@@ -0,0 +1,9 @@
+.user-page-footer :global {
+  .grw-user-page-list-m {
+    svg {
+      width: 35px;
+      height: 35px;
+      margin-bottom: 6px;
+    }
+  }
+}

+ 2 - 2
packages/app/src/pages/[[...path]].page.tsx

@@ -1,6 +1,5 @@
 import React, { useEffect } from 'react';
 import React, { useEffect } from 'react';
 
 
-
 import EventEmitter from 'events';
 import EventEmitter from 'events';
 
 
 import {
 import {
@@ -18,6 +17,7 @@ import { useRouter } from 'next/router';
 import superjson from 'superjson';
 import superjson from 'superjson';
 
 
 import { Comments } from '~/components/Comments';
 import { Comments } from '~/components/Comments';
+import { RecentlyCreatedIcon } from '~/components/Icons/RecentlyCreatedIcon';
 import { PageAlerts } from '~/components/PageAlert/PageAlerts';
 import { PageAlerts } from '~/components/PageAlert/PageAlerts';
 // import { useTranslation } from '~/i18n';
 // import { useTranslation } from '~/i18n';
 import { PageContentFooter } from '~/components/PageContentFooter';
 import { PageContentFooter } from '~/components/PageContentFooter';
@@ -353,7 +353,7 @@ const GrowiPage: NextPage<Props> = (props: Props) => {
               <div className="grw-user-page-list-m mt-5 d-edit-none">
               <div className="grw-user-page-list-m mt-5 d-edit-none">
                 <h2 id="recently-created-list" className="grw-user-page-header border-bottom pb-2 mb-3">
                 <h2 id="recently-created-list" className="grw-user-page-header border-bottom pb-2 mb-3">
                   <i id="recent-created-icon" className="mr-1">
                   <i id="recent-created-icon" className="mr-1">
-                    {/* <RecentlyCreatedIcon /> */}
+                    <RecentlyCreatedIcon />
                   </i>
                   </i>
                   Recently Created
                   Recently Created
                 </h2>
                 </h2>

+ 0 - 10
packages/app/src/styles/_user.scss

@@ -49,13 +49,3 @@ $easeInOutCubic: cubic-bezier(0.65, 0, 0.35, 1);
     }
     }
   }
   }
 }
 }
-
-.user-page-footer {
-  .grw-user-page-list-m {
-    svg {
-      width: 35px;
-      height: 35px;
-      margin-bottom: 6px;
-    }
-  }
-}