diff --git a/frontend/src/Pages/picpagination.tsx b/frontend/src/Pages/picpagination.tsx index 862a5ea311279876c5dc0931dac510f1de4ed903..656596ab2770e87e7cfad41940840dd8689a9468 100644 --- a/frontend/src/Pages/picpagination.tsx +++ b/frontend/src/Pages/picpagination.tsx @@ -1,54 +1,50 @@ -import React, { useRef } from "react"; +// import React, { useRef, useState} from "react"; -type num = { - total: number, - page: number, - setPage: Function -} +// type num = { +// total: number, +// page: number, +// setPage: Function -export function Pagination({ total, page, setPage }: num) { - const numPages = Math.ceil(total / 15); - const firstLeftClick = useRef(true); - const firstRightClick = useRef(true); +// } - const left = () => { - if (firstLeftClick.current) { - firstLeftClick.current = false; - firstRightClick.current = true; - } else { - setPage(page - 1) - } - }; +// export function Pagination({ total, page, setPage}: num) { +// const numPages = Math.ceil(total / 15); +// const firstLeftClick = useRef(true); +// const firstRightClick = useRef(true); + +// const leftClick = () => { +// if (firstLeftClick.current) { +// firstLeftClick.current = false; +// firstRightClick.current = true; +// } else { +// setPage(page - 1) +// } +// }; - const right = () => { - if (firstRightClick.current) { - firstLeftClick.current = true; - firstRightClick.current = false; - } else { - setPage(page + 1) - } - }; +// const rightClick = () => { +// if (firstRightClick.current) { +// firstLeftClick.current = true; +// firstRightClick.current = false; +// } else { +// setPage(page + 1) +// } +// }; +// }; - return ( -
{pic.name}
{pic.name}
{pic.name}