diff --git a/frontend/src/components/Home.js b/frontend/src/components/Home.js
index 85e8b81..f4d6bda 100644
--- a/frontend/src/components/Home.js
+++ b/frontend/src/components/Home.js
@@ -93,23 +93,25 @@ export default function Home() {
}
const headers = {
'Content-Type': 'application/json',
- 'Authorization': `Bearer ${token}`
- }
+ Authorization: `Bearer ${token}`,
+ };
fetch(url, {
- headers: headers
+ headers: headers,
})
- .then((response) => checkForErrors(response))
- .then((data) => setLeads(data.leads))
- // TODO: create state for error and set state instead of just console.error
- // conditional rendering if there is an error
- .catch((error) => console.error(error.message));
+ .then((response) => checkForErrors(response))
+ .then((data) => setLeads(data.leads))
+ // TODO: create state for error and set state instead of just console.error
+ // conditional rendering if there is an error
+ .catch((error) => console.error(error.message));
fetch(n_pagesUrl, {
- headers: headers
+ headers: headers,
})
- .then((response) => checkForErrors(response))
- .then((data) => setMaxPages( Math.ceil(data.pages * data.query.perpage / perpage) ))
- .catch((error) => console.error(error.message));
+ .then((response) => checkForErrors(response))
+ .then((data) =>
+ setMaxPages(Math.ceil((data.pages * data.query.perpage) / perpage))
+ )
+ .catch((error) => console.error(error.message));
}, [page, perpage, maxpages, search]);
return (
diff --git a/frontend/src/components/PaginationControl.js b/frontend/src/components/PaginationControl.js
index f88819a..a1c5924 100644
--- a/frontend/src/components/PaginationControl.js
+++ b/frontend/src/components/PaginationControl.js
@@ -7,7 +7,7 @@ import { DEBOUNCE_TIME_MS } from '../constants';
const useStyles = makeStyles((theme) => ({
paginationTextField: {
width: '115px',
- marginLeft: '5px'
+ marginLeft: '5px',
},
}));
@@ -67,7 +67,9 @@ export default function PaginationControl({
{page} / {maxpages}
-