Skip to content

Commit bf9ff27

Browse files
changed conditional rendering format
1 parent 7e843e2 commit bf9ff27

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/components/Pagination.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ const Pagination = (props) => {
3030
}
3131
}, [storyCount])
3232

33-
if (storyCount > 5) {
34-
return (
33+
return (
34+
storyCount > 5 && (
3535
<div className='pagination'>
3636
<span
3737
className={`btn btn-pagination ${
@@ -81,9 +81,7 @@ const Pagination = (props) => {
8181
</span>
8282
</div>
8383
)
84-
} else {
85-
return null
86-
}
84+
)
8785
}
8886

8987
export default Pagination

0 commit comments

Comments
 (0)