Просмотр исходного кода

successfully displayed the icon

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

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

@@ -54,7 +54,7 @@ export const InAppNotification = (props: Props): JSX.Element => {
 
 
   const renderInAppNotificationContent = (): JSX.Element => {
   const renderInAppNotificationContent = (): JSX.Element => {
     switch (componentName) {
     switch (componentName) {
-      case 'Page:COMMENT':
+      case 'Page:COMMENT_UPDATE':
         return <PageCommentNotification {...propsNew} onClick={props.onClick(props.notification)} />;
         return <PageCommentNotification {...propsNew} onClick={props.onClick(props.notification)} />;
       default:
       default:
         return <></>;
         return <></>;
@@ -68,7 +68,7 @@ export const InAppNotification = (props: Props): JSX.Element => {
         {renderUserImage()}
         {renderUserImage()}
         {renderInAppNotificationContent()}
         {renderInAppNotificationContent()}
       </div>
       </div>
-      <FormattedDistanceDate id={props.notification._id} date={props.notification.createdAt} isShowTooltip={false} />
+      {/* <FormattedDistanceDate id={props.notification._id} date={props.notification.createdAt} isShowTooltip={false} /> */}
     </>
     </>
   );
   );
 
 

+ 7 - 1
packages/app/src/components/InAppNotification/PageCommentNotification.tsx

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