틴더카드........
증멜 많이 쓸 기능이라 생각되는데
if (idx === num) {
return (
<TinderCard
onSwipe={onSwipe}
onCardLeftScreen={onSwipe}
onCardRightScreen={onSwipe}
preventSwipe={["up", "down"]}
>
<img src={img} />
</TinderCard>
</DragItem>
2주차 과제 해설 1시간 20분짜리 영상 10번은 봐야 틴더카드 함수 혼자 쓸수있을랑가 말랑가
// 300 ms후 reset 해줍니다!
// 이 300ms는 props로 받아서 처리해줘도 좋겠네요!
// props로 받아온, 콜백 함수도 여기서 처리해줄게요!
window.setTimeout(() => {
reset();
onSwipe(direct);
}, 300);
return;