Skip to content

Commit

Permalink
Updated pluginCard layout (jenkinsci#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
dheerajodha authored Mar 16, 2021
1 parent 2db6f51 commit 2cd5d1f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frontend/src/components/layouts/CardLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const DEFAULT_SORT_TYPES = [
['updated', 'Release date']
]

const DEFAULT_CARDS_PER_PAGE = 10
const DEFAULT_CARDS_PER_PAGE = 12

const CardLayout = ({
setConfiguration,
Expand Down Expand Up @@ -75,13 +75,13 @@ const CardLayout = ({
// Create index array
const indexArray = []
// Calculate first index
let lastIndex = indexOfFirstData / 10 + 1
let lastIndex = indexOfFirstData / 12 + 1

let firstIndex = 0
if (lastIndex >= 10 ) {
firstIndex = lastIndex - 10
if (lastIndex >= 12 ) {
firstIndex = lastIndex - 12
} else {
lastIndex = 9
lastIndex = 11
}

let counter = 0
Expand All @@ -108,7 +108,7 @@ const CardLayout = ({
return true
}).map(data => {
return (
<Col sm="3" key={ data.name }>
<Col sm="4" key={ data.name }>
{cardInstanceFunc({ data, setConfiguration })}
</Col>
)
Expand Down

0 comments on commit 2cd5d1f

Please sign in to comment.