|
|
@@ -56,6 +56,17 @@ const InAppNotificationElm = (props: Props): JSX.Element => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
+ const renderNotificationDate = (): JSX.Element => {
|
|
|
+ return (
|
|
|
+ <FormattedDistanceDate
|
|
|
+ id={notification._id}
|
|
|
+ date={notification.createdAt}
|
|
|
+ isShowTooltip={false}
|
|
|
+ differenceForAvoidingFormat={Number.POSITIVE_INFINITY}
|
|
|
+ />
|
|
|
+ );
|
|
|
+ };
|
|
|
+
|
|
|
const actionUsers = getActionUsers();
|
|
|
|
|
|
const actionType: string = notification.action;
|
|
|
@@ -119,12 +130,7 @@ const InAppNotificationElm = (props: Props): JSX.Element => {
|
|
|
<b>{actionUsers}</b> {actionMsg} <PagePathLabel page={pagePath} />
|
|
|
</div>
|
|
|
<i className={`${actionIcon} mr-2`} />
|
|
|
- <FormattedDistanceDate
|
|
|
- id={notification._id}
|
|
|
- date={notification.createdAt}
|
|
|
- isShowTooltip={false}
|
|
|
- differenceForAvoidingFormat={Number.POSITIVE_INFINITY}
|
|
|
- />
|
|
|
+ {renderNotificationDate()}
|
|
|
</div>
|
|
|
</div>
|
|
|
);
|