๋ชฉ๋กpagination (2)
๐ค ์์งlog ๐ค
// Main.tsx import { useEffect, useState } from "react"; import styled from "styled-components"; import { useQuery } from "react-query"; import Pagination from "../templates/Pagination"; const Main = () => { // const [post, setPost] = useState([]); const [totalPosts, setTotalPosts] = useState(10); // ํ์ด์ง ๋น ๊ฒ์๋ฌผ ์ const [page, setPage] = useState(1); // ํ์ฌ ํ์ด์ง ๋ฒํธ const offset = (page - 1) * totalP..
Naver ์ํ ๊ฒ์ ๐ฃ 1. Router.js ์์ฑ import { BrowserRouter, Routes, Route } from 'react-router-dom' import Main from './components/pages/Main' import Movie from './components/pages/Movie' import Book from './comp.. eun-jii.tistory.com Naver ์ฑ ๊ฒ์ Naver ์ํ ๊ฒ์ ๐ฃ 1. Router.js ์์ฑ import { BrowserRouter, Routes, Route } from 'react-router-dom' import Main from './components/pages/Main' import Movie from './..