|
@@ -8,7 +8,6 @@ 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 type { IPageSnapshot } from '~/models/serializers/in-app-notification-snapshot/page';
|
|
|
|
|
|
|
|
|
|
import FormattedDistanceDate from '../../FormattedDistanceDate';
|
|
import FormattedDistanceDate from '../../FormattedDistanceDate';
|
|
|
|
|
|
|
@@ -27,9 +26,6 @@ const PageModelNotification: ForwardRefRenderFunction<IInAppNotificationOpenable
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
- // Type is determined by type guard in InAppNotificationList.tsx
|
|
|
|
|
- const snapshot = notification.snapshot as IPageSnapshot;
|
|
|
|
|
-
|
|
|
|
|
// publish open()
|
|
// publish open()
|
|
|
useImperativeHandle(ref, () => ({
|
|
useImperativeHandle(ref, () => ({
|
|
|
open() {
|
|
open() {
|
|
@@ -46,7 +42,7 @@ const PageModelNotification: ForwardRefRenderFunction<IInAppNotificationOpenable
|
|
|
return (
|
|
return (
|
|
|
<div className="p-2 overflow-hidden">
|
|
<div className="p-2 overflow-hidden">
|
|
|
<div className="text-truncate">
|
|
<div className="text-truncate">
|
|
|
- <b>{actionUsers}</b> {actionMsg} <PagePathLabel path={snapshot.path} />
|
|
|
|
|
|
|
+ <b>{actionUsers}</b> {actionMsg} <PagePathLabel path={notification.parsedSnapshot?.path ?? ''} />
|
|
|
</div>
|
|
</div>
|
|
|
<i className={`${actionIcon} mr-2`} />
|
|
<i className={`${actionIcon} mr-2`} />
|
|
|
<FormattedDistanceDate
|
|
<FormattedDistanceDate
|