Skip to content

Commit 1993865

Browse files
committed
pref: remove useless code
1 parent b76bdf9 commit 1993865

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/Pagination.jsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ export default class Pagination extends React.Component {
129129
}
130130
}
131131

132-
getJumpPrevPage() {
132+
getJumpPrevPage = () => {
133133
return Math.max(1, this.state.current - (this.props.showLessItems ? 3 : 5));
134134
}
135135

136-
getJumpNextPage() {
136+
getJumpNextPage = () => {
137137
return Math.min(this.calculatePage(), this.state.current + (this.props.showLessItems ? 3 : 5));
138138
}
139139

@@ -263,14 +263,6 @@ export default class Pagination extends React.Component {
263263
}
264264
}
265265

266-
getJumpPrevPage() {
267-
return Math.max(1, this.state.current - (this.props.showLessItems ? 3 : 5));
268-
}
269-
270-
getJumpNextPage() {
271-
return Math.min(this.calculatePage(), this.state.current + (this.props.showLessItems ? 3 : 5));
272-
}
273-
274266
jumpPrev = () => {
275267
this.handleChange(this.getJumpPrevPage());
276268
}

0 commit comments

Comments
 (0)