Skip to content

Commit

Permalink
fix: state를 사용해서 리스트 관리하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ocahs9 committed Jul 9, 2024
1 parent fbe1381 commit a645637
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/MyRegisterdShow/MyRegisterdShow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const MyRegisterdShow = () => {
const handleBtn = () => {
navigate("/");
};

//추후 API에서 받아온 걸로 set할 예정
const [showList, setShowList] = useState(MY_REGISTERED_SHOW.data);
const [isNothing, setIsNothing] = useState(false);

return (
Expand Down Expand Up @@ -45,7 +46,7 @@ const MyRegisterdShow = () => {
</S.Banner>
<S.RegisteredCardWrapper>
{/*Get 요청 받아서 map으로 반복적으로 렌더링할 예정 */}
{MY_REGISTERED_SHOW.data?.map((item: RegisteredObjProps, index: number) => (
{showList?.map((item: RegisteredObjProps, index: number) => (
<RegisteredCard
key={item.id}
title={item.title}
Expand Down

0 comments on commit a645637

Please sign in to comment.