diff --git a/src/components/Accounts/Card.tsx b/src/components/Accounts/Card.tsx index 9e75d95..7ee0c02 100644 --- a/src/components/Accounts/Card.tsx +++ b/src/components/Accounts/Card.tsx @@ -29,12 +29,12 @@ export const AccountCard = ({ id, ...rest }: IAccountCardProps) => { ) } -const AccountCardSkeleton = ({ electionCount: ec, ...rest }: IAccountCardProps) => { +const AccountCardSkeleton = ({ electionCount: ec, id, ...rest }: IAccountCardProps) => { const { organization, loading } = useOrganization() const { t } = useTranslation() const electionCount = ec ?? organization?.electionIndex - const pid = organization?.address + const pid = id ?? organization?.address if (!pid) return null diff --git a/src/components/Accounts/List.tsx b/src/components/Accounts/List.tsx index f1e9947..3284463 100644 --- a/src/components/Accounts/List.tsx +++ b/src/components/Accounts/List.tsx @@ -71,8 +71,8 @@ export const AccountsList = () => { return ( <> - {orgs?.organizations.map((org) => ( - + {orgs?.organizations.map((org, i) => ( + ))} diff --git a/src/components/Process/ProcessList.tsx b/src/components/Process/ProcessList.tsx index 0c02f59..c650c3d 100644 --- a/src/components/Process/ProcessList.tsx +++ b/src/components/Process/ProcessList.tsx @@ -135,7 +135,6 @@ export const PaginatedProcessList = () => { } const ProcessList = () => { - const { t } = useTranslation() const { page }: { page?: number } = useRoutedPagination() const { queryParams: processFilters } = useQueryParams() diff --git a/src/components/Transactions/TransactionList.tsx b/src/components/Transactions/TransactionList.tsx index ef80a9f..c30c668 100644 --- a/src/components/Transactions/TransactionList.tsx +++ b/src/components/Transactions/TransactionList.tsx @@ -58,9 +58,7 @@ export const PaginatedTransactionList = () => { } const TransactionsList = () => { const { page }: { page?: number } = useRoutedPagination() - const { data: count, isLoading: isLoadingCount } = useTransactionsCount() - - const totalPages = Math.ceil(count / PaginationItemsPerPage) + const { isLoading: isLoadingCount } = useTransactionsCount() const { data, @@ -122,16 +120,13 @@ const TransactionsListCards = ({ height?: number }) => { const { t } = useTranslation() - if (!data || (data && data.transactions.length <= 0)) { - return - } if (isLoading) { return } - if (data?.pagination.totalItems === 0) { - return + if (data && data.transactions.length <= 0) { + return } if (isError || !data) {