File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
frontend-react/src/components Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -446,8 +446,16 @@ export const Dashboard: React.FC = () => {
446446 </ h2 >
447447 { pagination && (
448448 < p className = "text-gray-600" >
449- Showing < span className = "font-semibold text-gray-900" > { data . length } </ span > of{ ' ' }
450- < span className = "font-semibold text-gray-900" > { pagination . totalItems . toLocaleString ( ) } </ span > messages
449+ { pagination . totalItems > 0 ? (
450+ < >
451+ Showing < span className = "font-semibold text-gray-900" >
452+ { ( ( pagination . currentPage - 1 ) * pagination . pageSize + 1 ) . toLocaleString ( ) } -{ Math . min ( pagination . currentPage * pagination . pageSize , pagination . totalItems ) . toLocaleString ( ) }
453+ </ span > of{ ' ' }
454+ < span className = "font-semibold text-gray-900" > { pagination . totalItems . toLocaleString ( ) } </ span > messages
455+ </ >
456+ ) : (
457+ < span className = "font-semibold text-gray-900" > 0 messages</ span >
458+ ) }
451459 </ p >
452460 ) }
453461 </ div >
You can’t perform that action at this time.
0 commit comments