Shun Miyazawa 4 лет назад
Родитель
Сommit
a8f7191464

+ 1 - 2
packages/app/src/components/InAppNotification/InAppNotification.tsx

@@ -1,8 +1,7 @@
 import React from 'react';
 
 import { UserPicture } from '@growi/ui';
-import { PageCommentNotification } from './PageCommentNotification';
-import { PageUpdateNotification } from './PageUpdateNotification';
+import { PageCommentNotification, PageUpdateNotification } from './PageContent';
 import { InAppNotification as IInAppNotification } from '../../interfaces/in-app-notification';
 
 interface Props {

+ 15 - 0
packages/app/src/components/InAppNotification/PageCommentNotification.tsx → packages/app/src/components/InAppNotification/PageContent.tsx

@@ -8,6 +8,7 @@ interface Props {
   notification: IInAppNotification
   onClick: () => void
 }
+
 export const PageCommentNotification = (props: Props) => {
 
   return (
@@ -19,5 +20,19 @@ export const PageCommentNotification = (props: Props) => {
       <FormattedDistanceDate id={props.notification._id} date={props.notification.createdAt} isShowTooltip={false} />
     </>
   );
+};
+
+
+export const PageUpdateNotification = (props: Props) => {
+
+  return (
+    <>
+      <div>
+        <b>{props.actionUsers}</b> page updated on {props.notification.target.path}
+      </div>
+      <i className="fa fa-file-o mr-2" />
+      <FormattedDistanceDate id={props.notification._id} date={props.notification.createdAt} isShowTooltip={false} />
+    </>
+  );
 
 };

+ 0 - 23
packages/app/src/components/InAppNotification/PageUpdateNotification.tsx

@@ -1,23 +0,0 @@
-import React from 'react';
-import { InAppNotification as IInAppNotification } from '../../interfaces/in-app-notification';
-
-import FormattedDistanceDate from '../FormattedDistanceDate';
-
-interface Props {
-  actionUsers: string
-  notification: IInAppNotification
-  onClick: () => void
-}
-export const PageUpdateNotification = (props: Props) => {
-
-  return (
-    <>
-      <div>
-        <b>{props.actionUsers}</b> page updated on {props.notification.target.path}
-      </div>
-      <i className="fa fa-file-o mr-2" />
-      <FormattedDistanceDate id={props.notification._id} date={props.notification.createdAt} isShowTooltip={false} />
-    </>
-  );
-
-};