fetch 하는 과정에서 objectId값을 가져오지 못하는 주의 메세지가 계속 발생하는데
이게 어느 페이지의 어떤 코드에서 발생하고 있는 문제인지 알 수 있나요ㅠ
page.js를 수정해야 하는지 서버에서 받을 때 문제인지 모르겠어요..
Warning: Only plain objects can be passed to Client Components from Server Components. Objects with toJSON methods are not supported. Convert it manually
to a simple value before passing it to props.
objectId() 값을 아래처럼 보냈는데 여기서 또 json으로 변환해 줘야 하나요..?
<button
className={style.itemDelBtn}
onClick={(e) => {
fetch("/api/abc/" + item.book_id.toString())
.then((r) => r.json())
.then(() => {
e.target.parentElement.style.opacity = 0;
setTimeout(() => {
e.target.parentElement.style.display = "none";
}, 1000);
});
}}
>