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

Changing the location where parsed snapshots are taken

WNomunomu 2 лет назад
Родитель
Сommit
892899ad83

+ 1 - 1
apps/app/src/components/InAppNotification/InAppNotificationList.tsx

@@ -26,7 +26,7 @@ const InAppNotificationList: FC<Props> = (props: Props) => {
     );
     );
   }
   }
 
 
-  const notifications = inAppNotificationData.docs.filter((notification) => { return notification.parsedSnapshot != null });
+  const notifications = inAppNotificationData.docs;
 
 
   return (
   return (
     <>
     <>

+ 3 - 0
apps/app/src/components/InAppNotification/PageNotification/PageModelNotification.tsx

@@ -7,6 +7,7 @@ import { useRouter } from 'next/router';
 
 
 import type { IInAppNotificationOpenable } from '~/client/interfaces/in-app-notification-openable';
 import type { IInAppNotificationOpenable } from '~/client/interfaces/in-app-notification-openable';
 import type { IInAppNotification } from '~/interfaces/in-app-notification';
 import type { IInAppNotification } from '~/interfaces/in-app-notification';
+import * as pageSerializers from '~/models/serializers/in-app-notification-snapshot/page';
 
 
 import { ModelNotification } from './ModelNotification';
 import { ModelNotification } from './ModelNotification';
 import { useActionMsgAndIconForPageModelNotification } from './useActionAndMsg';
 import { useActionMsgAndIconForPageModelNotification } from './useActionAndMsg';
@@ -58,6 +59,8 @@ const PageModelNotification: ForwardRefRenderFunction<IInAppNotificationOpenable
     }
     }
   };
   };
 
 
+  notification.parsedSnapshot = pageSerializers.parseSnapshot(notification.snapshot);
+
   return (
   return (
     <ModelNotification
     <ModelNotification
       notification={notification}
       notification={notification}