Skip to content

Commit

Permalink
Merge pull request #89 from Choco-Express/dev
Browse files Browse the repository at this point in the history
✅ otherData 콘솔 확인
  • Loading branch information
kimyeonjinn authored Sep 24, 2024
2 parents e3a704f + 3aaabcd commit 62a39da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pages/ChocoList/ChocoList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ const ChocoList = () => {
const [error, setError] = useState(null);

const ITEMS_PER_PAGE = otherData?.boxType === 4 ? 6 : 9;

console.log("otherData:", otherData);
const getChocoList = async (page) => {
try {
const response = await instance.get(`/api/choco?page=${page}`);
console.log("API Response:", response.data);

if (response.data && response.data.message === "SUCCESS") {
const { chocoList, totalPage } = response.data.result;
console.log("chocoList:", chocoList);
console.log("totalPage:", totalPage);

setChocoData(chocoList);
setTotalPages(totalPage);
setError(null);
Expand Down

0 comments on commit 62a39da

Please sign in to comment.