File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
lib/components/TableScorecards
pages/scorecards/ScorecardsListPage Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ export const TableScorecards: FC<Props> = (props: Props) => {
33
33
const { width : screenWidth } : WindowSize = useWindowSize ( )
34
34
const isTablet = useMemo ( ( ) => screenWidth <= 1000 , [ screenWidth ] )
35
35
36
+ const start = ( props . page - 1 ) * ( props . perPage ?? 0 ) + 1
37
+ const end = Math . min ( props . page * ( props . perPage ?? 0 ) , props . metadata ?. total ?? 0 )
38
+
36
39
const columns = useMemo < TableColumn < Scorecard > [ ] > (
37
40
( ) => [
38
41
{
@@ -153,12 +156,15 @@ export const TableScorecards: FC<Props> = (props: Props) => {
153
156
) }
154
157
< div className = { styles . pagination } >
155
158
< div className = { styles . paginationText } >
156
- Showing 1-
157
- { props . perPage }
159
+ Showing
160
+ { ' ' }
161
+ { start }
162
+ -
163
+ { end }
158
164
{ ' ' }
159
165
of
160
166
{ ' ' }
161
- { props . metadata . total }
167
+ { props . metadata ? .total ?? 0 }
162
168
{ ' ' }
163
169
results
164
170
</ div >
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ export const ScorecardsListPage: FC<{}> = () => {
94
94
) : (
95
95
< >
96
96
{ scorecards . length === 0 ? (
97
- < TableNoRecord />
97
+ < TableNoRecord message = 'No scorecards were found that meet your criteria.' />
98
98
) : (
99
99
< TableScorecards
100
100
onClone = { handleScorecardClone }
You can’t perform that action at this time.
0 commit comments