kaori 4 лет назад
Родитель
Сommit
2150ff7b4b

+ 0 - 14
packages/app/src/components/InAppNotification/InAppNotification.tsx

@@ -6,7 +6,6 @@ import { PageUpdateNotification, PageCommentNotification } from './NotificationC
 
 interface Props {
   notification: IInAppNotification
-  // onClick: any
 }
 
 export const InAppNotification = (props: Props): JSX.Element => {
@@ -55,19 +54,6 @@ export const InAppNotification = (props: Props): JSX.Element => {
     );
   };
 
-  const notificationClickHandler = async(notification: IInAppNotification) => {
-    console.log('notificationClickHandler');
-
-    try {
-      // await this.props.crowi.apiPost('/notification.open', { id: notification._id });
-      // jump to target page
-      // window.location.href = notification.target.path;
-    }
-    catch (err) {
-      // logger.error(err);
-    }
-  };
-
   const renderInAppNotificationContent = (): JSX.Element => {
     const propsNew = {
       actionUsers: getActionUsers(),

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

@@ -7,14 +7,13 @@ import FormattedDistanceDate from '../FormattedDistanceDate';
 interface Props {
   actionUsers: string
   notification: IInAppNotification
-  onClick: () => void
 }
 
 // const notificationClickHandler = async(notification: IInAppNotification) => {
 const notificationClickHandler = async(pagePath) => {
-  console.log('notificationClickHandler');
 
   try {
+    // TODO: change notification status read by #80904
     // await this.props.crowi.apiPost('/notification.open', { id: notification._id });
     // jump to target page
     window.location.href = pagePath;