16 lines
403 B
TypeScript
16 lines
403 B
TypeScript
export type UserNotification = {
|
|
id: string;
|
|
operationId?: string | null;
|
|
kind: string;
|
|
title: string;
|
|
message: string;
|
|
linkPath?: string | null;
|
|
createdAtUtc: string;
|
|
readAtUtc?: string | null;
|
|
};
|
|
|
|
export function notificationDateLabel(value: string, locale?: string): string {
|
|
const date = new Date(value);
|
|
return Number.isNaN(date.getTime()) ? "" : date.toLocaleString(locale);
|
|
}
|