Skip to content

Commit

Permalink
code quality improvised
Browse files Browse the repository at this point in the history
  • Loading branch information
somya51p committed Apr 21, 2022
1 parent d5c184c commit c0c1cfe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 48 deletions.
36 changes: 0 additions & 36 deletions changes.patch

This file was deleted.

20 changes: 8 additions & 12 deletions src/components/Plugins/Plugins.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,13 @@ export class Plugins extends Component {
)

const pluginsCount=plugins.totalCount > 0 ? plugins.totalCount : 0;

const pluginsLast=(paginationOffset + paginationLimit > pluginsCount) ?
pluginsCount
:
(paginationOffset > 0) ?
paginationOffset
:
paginationLimit;

return (
<article>
Expand Down Expand Up @@ -416,17 +422,7 @@ export class Plugins extends Component {
<p style={{ fontSize: '1.25em', margin: '0', color: 'black', fontWeight: '600' }}>
{pluginsCount} plugins found
</p>
Showing {Math.min(pluginsCount, paginationOffset + 1)} to {' '}
{
// eslint-disable-next-line no-nested-ternary
(paginationOffset + paginationLimit > pluginsCount) ?
pluginsCount
:
(paginationOffset > 0) ?
paginationOffset
:
paginationLimit
}
Showing {Math.min(pluginsCount, paginationOffset + 1)} to {pluginsLast}
</span>
)
}
Expand Down

0 comments on commit c0c1cfe

Please sign in to comment.