Skip to content

Commit

Permalink
[explorer] Replaces 'First' with '1' and 'Last' with Final Page Numbe…
Browse files Browse the repository at this point in the history
…r in Pagination (MystenLabs#3419)

* replaces 'First' with '1' and 'Last' with Final Page Number

* stablize width of pagination

* adds polyfills to the webpack config

* add browserify dependencies

* remove duplicate license statements

* license for webpack config file

* fix transaction definition test

* Revert "fix transaction definition test"

This reverts commit 2961380.

* Update index.guard.ts

* fix authSignInfo sig field

* Delete webpack.config.js

* Update package.json

Co-authored-by: Stella Cannefax <[email protected]>
  • Loading branch information
apburnie and Stella Cannefax authored Jul 22, 2022
1 parent f49c793 commit 1b343bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ button.gone {
/* Mobile */

.mobilefooter {
@apply sm:hidden block;
@apply sm:hidden block w-[85vw];
}

.mobiletoprow {
@apply sm:hidden block grid grid-cols-6 my-2;
}

.mobiletoprow > button:nth-child(1) {
.mobiletoprow > button:nth-child(1),
.mobiletoprow > button:nth-child(3) {
@apply col-span-1;
}

Expand Down
10 changes: 5 additions & 5 deletions explorer/client/src/components/pagination/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function Pagination({
<></>
);

const IndexZeroButton = (label: string) => (
const IndexZeroButton = (label: string = '1') => (
<button
className={
pageIndex === 0 ? styles.pagenumber : styles.btncontainer
Expand Down Expand Up @@ -204,7 +204,7 @@ function Pagination({
const desktopPagination = (
<div>
{BackButton}
{IndexZeroButton('1')}
{IndexZeroButton()}

<button
className={
Expand Down Expand Up @@ -262,11 +262,11 @@ function Pagination({
const mobilePagination = (
<div>
<div className={styles.mobiletoprow}>
{IndexZeroButton('First')}
{IndexZeroButton()}
<button className={styles.basecontainer}>
Page {pageIndex + 1} of {finalPageNo}
Page {pageIndex + 1}
</button>
{FinalPageButton(finalPageNo, 'Last')}
{FinalPageButton(finalPageNo)}
</div>
<div className={styles.mobilebottomrow}>
{BackButton}
Expand Down

0 comments on commit 1b343bb

Please sign in to comment.