File tree Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -464,16 +464,6 @@ describe('utils/helpers.ts', () => {
464464 } ) ;
465465
466466 describe ( 'formatNotificationUpdatedAt' , ( ) => {
467- it ( 'should use last_read_at if available' , ( ) => {
468- const notification = {
469- ...mockSingleNotification ,
470- last_read_at : '2021-06-23T16:00:00Z' ,
471- updated_at : '2021-06-23T17:00:00Z' ,
472- } ;
473-
474- expect ( formatNotificationUpdatedAt ( notification ) ) . toContain ( 'ago' ) ;
475- } ) ;
476-
477467 it ( 'should use updated_at if last_read_at is null' , ( ) => {
478468 const notification = {
479469 ...mockSingleNotification ,
Original file line number Diff line number Diff line change @@ -157,10 +157,8 @@ export function formatForDisplay(text: string[]): string {
157157export function formatNotificationUpdatedAt (
158158 notification : Notification ,
159159) : string {
160- const date = notification . last_read_at ?? notification . updated_at ;
161-
162160 try {
163- return formatDistanceToNowStrict ( parseISO ( date ) , {
161+ return formatDistanceToNowStrict ( parseISO ( notification . updated_at ) , {
164162 addSuffix : true ,
165163 } ) ;
166164 } catch ( e ) { }
You can’t perform that action at this time.
0 commit comments