Shun Miyazawa 4 лет назад
Родитель
Сommit
46fc20f7ec
1 измененных файлов с 7 добавлено и 5 удалено
  1. 7 5
      packages/app/src/components/InAppNotification/NotificationContent.tsx

+ 7 - 5
packages/app/src/components/InAppNotification/NotificationContent.tsx

@@ -1,10 +1,8 @@
 import React from 'react';
 import React from 'react';
+import { PagePathLabel } from '@growi/ui';
 import { InAppNotification as IInAppNotification } from '../../interfaces/in-app-notification';
 import { InAppNotification as IInAppNotification } from '../../interfaces/in-app-notification';
-
 import FormattedDistanceDate from '../FormattedDistanceDate';
 import FormattedDistanceDate from '../FormattedDistanceDate';
 
 
-import { PagePath } from './PagePath';
-
 interface Props {
 interface Props {
   actionUsers: string
   actionUsers: string
   notification: IInAppNotification
   notification: IInAppNotification
@@ -13,10 +11,12 @@ interface Props {
 
 
 export const PageCommentNotification = (props: Props): JSX.Element => {
 export const PageCommentNotification = (props: Props): JSX.Element => {
 
 
+  const pagePath = { path: props.notification.target.path };
+
   return (
   return (
     <>
     <>
       <div>
       <div>
-        <b>{props.actionUsers}</b> commented on <PagePath notification={props.notification} />
+        <b>{props.actionUsers}</b> commented on  <PagePathLabel page={pagePath} />
       </div>
       </div>
       <i className="fa fa-comment-o mr-2" />
       <i className="fa fa-comment-o mr-2" />
       <FormattedDistanceDate id={props.notification._id} date={props.notification.createdAt} isShowTooltip={false} />
       <FormattedDistanceDate id={props.notification._id} date={props.notification.createdAt} isShowTooltip={false} />
@@ -26,10 +26,12 @@ export const PageCommentNotification = (props: Props): JSX.Element => {
 
 
 export const PageUpdateNotification = (props: Props): JSX.Element => {
 export const PageUpdateNotification = (props: Props): JSX.Element => {
 
 
+  const pagePath = { path: props.notification.target.path };
+
   return (
   return (
     <>
     <>
       <div>
       <div>
-        <b>{props.actionUsers}</b> page updated on <PagePath notification={props.notification} />
+        <b>{props.actionUsers}</b> page updated on <PagePathLabel page={pagePath} />
       </div>
       </div>
       <i className="fa fa-file-o mr-2" />
       <i className="fa fa-file-o mr-2" />
       <FormattedDistanceDate id={props.notification._id} date={props.notification.createdAt} isShowTooltip={false} />
       <FormattedDistanceDate id={props.notification._id} date={props.notification.createdAt} isShowTooltip={false} />