Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
niteshsinha17 committed Mar 20, 2021
1 parent af89e27 commit 2b223a1
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/pages/Editor/containers/editContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,12 @@ const EditContextProvider = (props) => {
setPages(pagesCopy);
};

const nextPage = () => {
if (currentPage < pages.length - 1) {
setCurrentPage((currentPage) => currentPage + 1);
}
};
const nextPage = () =>
currentPage < pages.length - 1 &&
setCurrentPage((currentPage) => currentPage + 1);

const prevPage = () => {
if (currentPage > 0) {
setCurrentPage((currentPage) => currentPage - 1);
}
};
const prevPage = () =>
currentPage > 0 && setCurrentPage((currentPage) => currentPage - 1);

const [headValues,] = useState({
headSize: null,
Expand Down

0 comments on commit 2b223a1

Please sign in to comment.