From b038fe5844009aefa063a8bfcee38b1191343b2c Mon Sep 17 00:00:00 2001 From: Mati Dastugue Date: Tue, 14 Jan 2020 11:33:00 -0300 Subject: [PATCH] Fixed some bugs --- src/components/Home/helpers.tsx | 3 ++- src/components/common/Table/index.tsx | 3 ++- src/containers/Home/index.tsx | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/Home/helpers.tsx b/src/components/Home/helpers.tsx index 1b2270e..09c67e3 100644 --- a/src/components/Home/helpers.tsx +++ b/src/components/Home/helpers.tsx @@ -284,6 +284,7 @@ export const ActivenessBreakdownColumns = () => { { Header: 'Period', accessor: 'period', + disableFilters: true, }, { Header: 'MKR', @@ -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)}%` : '-'), }, ] } diff --git a/src/components/common/Table/index.tsx b/src/components/common/Table/index.tsx index 3aef5c7..fff0051 100644 --- a/src/components/common/Table/index.tsx +++ b/src/components/common/Table/index.tsx @@ -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 @@ -418,7 +419,7 @@ function Table({ columns, data, expanded, limitPerPage, scrollable, handleRow, s ))} - {pageIndex + 1}-{pageSize} of {data ? data.length : 0} + {pageIndex + 1}-{pageSize} of {rows ? rows.length : 0} previousPage()} disabled={!canPreviousPage}> diff --git a/src/containers/Home/index.tsx b/src/containers/Home/index.tsx index a3eb75d..63124cc 100644 --- a/src/containers/Home/index.tsx +++ b/src/containers/Home/index.tsx @@ -74,6 +74,9 @@ function MakerGovernanceInfo() { if (loading || gResult.loading || loadingMkrEvent || executivesResponsiveness.length === 0) { return } + console.log(error, 'error') + console.log(gResult.error, 'gResult') + console.log(mkrError, 'mkrError') if (error || gResult.error || mkrError) { return