Skip to content

Commit

Permalink
prevent render BoardPagination on error
Browse files Browse the repository at this point in the history
  • Loading branch information
tomivm committed Jun 24, 2024
1 parent 6cdfd4b commit a2c3e77
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/components/Board/TileEditor/LoadBoardEditor/LoadBoardEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,13 @@ const LoadBoardEditor = ({ intl, onLoadBoardChange, isLostedFolder }) => {
</Toolbar>
</AppBar>
<div className={styles.boardsListContainer}>
<BoardPagination
handleChange={handleChangeOnPage}
pagesCount={totalPages}
currentPage={currentPage}
/>
{!loading && !error && (
<BoardPagination
handleChange={handleChangeOnPage}
pagesCount={totalPages}
currentPage={currentPage}
/>
)}
{loading && (
<div className={styles.loaderContainer}>
<CircularProgress />
Expand All @@ -307,11 +309,13 @@ const LoadBoardEditor = ({ intl, onLoadBoardChange, isLostedFolder }) => {
{intl.formatMessage(messages.noBoardsFound)}'{searchValue}'
</Alert>
)}
<BoardPagination
handleChange={handleChangeOnPage}
pagesCount={totalPages}
currentPage={currentPage}
/>
{!loading && !error && (
<BoardPagination
handleChange={handleChangeOnPage}
pagesCount={totalPages}
currentPage={currentPage}
/>
)}
</div>
</Dialog>
<Dialog
Expand Down

0 comments on commit a2c3e77

Please sign in to comment.