Skip to content

Commit

Permalink
removed console
Browse files Browse the repository at this point in the history
  • Loading branch information
fullstackninja864 committed Nov 22, 2023
1 parent 7fd2319 commit 27db024
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
7 changes: 0 additions & 7 deletions apps/web/src/components/commons/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ const Link = forwardRef<HTMLAnchorElement, PropsWithChildren<LinkProps>>(
passHref
{...props}
ref={ref}
as={{
pathname,
query: {
...query,
...networkQuery,
}
}}
href={{
pathname,
query: {
Expand Down
5 changes: 1 addition & 4 deletions apps/web/src/components/commons/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export default function Pagination<T>({
},
next: nextPageParams,
};
console.log({ currentPageNumber })

if (nextPageParamsFromApi === undefined || nextPageParamsFromApi === null) {
return [pageButton.previous, pageButton.current];
Expand All @@ -82,7 +81,6 @@ export default function Pagination<T>({
}, [source]);

useEffect(() => {
console.log(router.query)
if (
!previousPagesParams.some(
(page) => page?.page_number === (router.query.page_number as string),
Expand All @@ -101,15 +99,14 @@ export default function Pagination<T>({
}, [router.query]);

useEffect(() => {
console.log({ previousPagesParams }, router.query.page_number)
// bug: clicking on the arrow button will cause the page to go back to page 1
// If pageNumber > 1 and previousPagesParams (local state) is cleared, go back to page 1
if (
Number(router.query.page_number) > 1 &&
previousPagesParams.length === 0
) {
setPreviousPagesParams([]);
// router.push(pathName);
router.push(pathName);
}
}, [router.query]);

Expand Down
1 change: 0 additions & 1 deletion apps/web/src/pages/blocks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ export async function getServerSideProps(
// Pass data to the page via props
return { props: { data } };
} catch (e) {
console.log({ e })
return { notFound: true };
}
}

0 comments on commit 27db024

Please sign in to comment.