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

+ 5 - 1
packages/app/src/components/InAppNotification/InAppNotificationElm.tsx

@@ -73,16 +73,20 @@ const InAppNotificationElm = (props: Props): JSX.Element => {
 
 
   const actionType: string = notification.action;
   const actionType: string = notification.action;
   let actionMsg: string;
   let actionMsg: string;
+  let actionIcon: string;
 
 
   switch (actionType) {
   switch (actionType) {
     case 'PAGE_UPDATE':
     case 'PAGE_UPDATE':
       actionMsg = 'updated on';
       actionMsg = 'updated on';
+      actionIcon = 'fa-file-o';
       break;
       break;
     case 'COMMENT_CREATE':
     case 'COMMENT_CREATE':
       actionMsg = 'commented on';
       actionMsg = 'commented on';
+      actionIcon = 'fa-comment-o';
       break;
       break;
     default:
     default:
       actionMsg = '';
       actionMsg = '';
+      actionIcon = '';
   }
   }
 
 
 
 
@@ -96,7 +100,7 @@ const InAppNotificationElm = (props: Props): JSX.Element => {
           <div>
           <div>
             <b>{actionUsers}</b> {actionMsg} <PagePathLabel page={pagePath} />
             <b>{actionUsers}</b> {actionMsg} <PagePathLabel page={pagePath} />
           </div>
           </div>
-          <i className="fa fa-file-o mr-2" />
+          <i className={`fa ${actionIcon} mr-2`} />
           <FormattedDistanceDate id={notification._id} date={notification.createdAt} isShowTooltip={false} />
           <FormattedDistanceDate id={notification._id} date={notification.createdAt} isShowTooltip={false} />
         </div>
         </div>
       </div>
       </div>