@@ -110,7 +110,7 @@ export default function Sidebar() {
110
110
{ group . title ? (
111
111
// we use btn class here to make sure that the padding/margin are aligned with the other items
112
112
< b
113
- className = "btn btn-ghost btn-xs bg-none btn-disabled block text-xs text-base-content text-start px-2 mb-0 mt-6 font-bold"
113
+ className = "btn btn-ghost btn-xs bg-none btn-disabled block text-xs text-base-content text-start px-2 mb-0 mt-6 font-bold opacity-50 "
114
114
role = "note"
115
115
aria-description = { group . title }
116
116
tabIndex = { 0 }
@@ -287,6 +287,9 @@ export function groupConversationsByDate(
287
287
const now = new Date ( ) ;
288
288
const today = new Date ( now . getFullYear ( ) , now . getMonth ( ) , now . getDate ( ) ) ; // Start of today
289
289
290
+ const yesterday = new Date ( today ) ;
291
+ yesterday . setDate ( today . getDate ( ) - 1 ) ;
292
+
290
293
const sevenDaysAgo = new Date ( today ) ;
291
294
sevenDaysAgo . setDate ( today . getDate ( ) - 7 ) ;
292
295
@@ -295,6 +298,7 @@ export function groupConversationsByDate(
295
298
296
299
const groups : { [ key : string ] : Conversation [ ] } = {
297
300
Today : [ ] ,
301
+ Yesterday : [ ] ,
298
302
'Previous 7 Days' : [ ] ,
299
303
'Previous 30 Days' : [ ] ,
300
304
} ;
@@ -311,6 +315,8 @@ export function groupConversationsByDate(
311
315
312
316
if ( convDate >= today ) {
313
317
groups [ 'Today' ] . push ( conv ) ;
318
+ } else if ( convDate >= yesterday ) {
319
+ groups [ 'Yesterday' ] . push ( conv ) ;
314
320
} else if ( convDate >= sevenDaysAgo ) {
315
321
groups [ 'Previous 7 Days' ] . push ( conv ) ;
316
322
} else if ( convDate >= thirtyDaysAgo ) {
@@ -335,6 +341,13 @@ export function groupConversationsByDate(
335
341
} ) ;
336
342
}
337
343
344
+ if ( groups [ 'Yesterday' ] . length > 0 ) {
345
+ result . push ( {
346
+ title : 'Yesterday' ,
347
+ conversations : groups [ 'Yesterday' ] ,
348
+ } ) ;
349
+ }
350
+
338
351
if ( groups [ 'Previous 7 Days' ] . length > 0 ) {
339
352
result . push ( {
340
353
title : 'Previous 7 Days' ,
0 commit comments