Skip to content

Commit

Permalink
Fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
matextrem committed Jan 14, 2020
1 parent 89f8114 commit b038fe5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/Home/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ export const ActivenessBreakdownColumns = () => {
{
Header: 'Period',
accessor: 'period',
disableFilters: true,
},
{
Header: 'MKR',
Expand Down Expand Up @@ -351,7 +352,7 @@ export const VotedPollcolumns = () => {
accessor: 'participation',
sortType: (a, b) => Number(a.original.participation) - Number(b.original.participation),
disableFilters: true,
Cell: ({ row }) => (row.original.participation ? `${row.original.participation}%` : '-'),
Cell: ({ row }) => (row.original.participation ? `${Number(row.original.participation).toFixed(6)}%` : '-'),
},
]
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/common/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ function Table({ columns, data, expanded, limitPerPage, scrollable, handleRow, s
const {
getTableProps,
headerGroups,
rows,
prepareRow,
page, // Instead of using 'rows', we'll use page,
// which has only the rows for the active page
Expand Down Expand Up @@ -418,7 +419,7 @@ function Table({ columns, data, expanded, limitPerPage, scrollable, handleRow, s
))}
</PageSelect>
<Pager>
{pageIndex + 1}-{pageSize} of {data ? data.length : 0}
{pageIndex + 1}-{pageSize} of {rows ? rows.length : 0}
</Pager>
<PageIconContainer onClick={() => previousPage()} disabled={!canPreviousPage}>
<PreviousIcon />
Expand Down
3 changes: 3 additions & 0 deletions src/containers/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ function MakerGovernanceInfo() {
if (loading || gResult.loading || loadingMkrEvent || executivesResponsiveness.length === 0) {
return <FullLoading />
}
console.log(error, 'error')
console.log(gResult.error, 'gResult')
console.log(mkrError, 'mkrError')

if (error || gResult.error || mkrError) {
return <Error />
Expand Down

0 comments on commit b038fe5

Please sign in to comment.