Skip to content

Commit

Permalink
fixed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
niteshsinha17 committed Mar 20, 2021
1 parent 2b223a1 commit b639c77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/pages/Editor/containers/editContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const EditContextProvider = (props) => {
const prevPage = () =>
currentPage > 0 && setCurrentPage((currentPage) => currentPage - 1);

const [headValues,] = useState({
const [headValues, ] = useState({
headSize: null,
headTop: 20,
headLeft: 20,
Expand All @@ -82,7 +82,7 @@ const EditContextProvider = (props) => {
headWidth: null,
headLetterSpace: null,
});
const [bodyValues, ] = useState({
const [bodyValues,] = useState({
bodySize: null,
bodyTop: 20,
bodyLeft: 20,
Expand Down
13 changes: 6 additions & 7 deletions src/pages/Editor/sections/OutputComponent/Output.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ const OutputComponent = () => {
const pages = editContext.pages
useEffect(() => {
var count = 0;
pages.forEach(page=>{
count+=page.body.text.length;
count+=page.head.text.length;
})
pages.forEach((page) => {
count += page.body.text.length;
count += page.head.text.length;
});
setWordCount(count);
},[pages]);

const displayPages = editContext.pages.map((page, index) => {
}, [wordCount, pages]);
const displayPages = pages.map((page, index) => {
return (
<Page
visible={index === editContext.currentPage}
Expand Down

0 comments on commit b639c77

Please sign in to comment.