-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from eunji-0623/장재혁
컬럼목록, 카드 목록 가져오는 api 적용, 컬럼카드 무한스크롤 적용
- Loading branch information
Showing
13 changed files
with
423 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/pages/dashboard.{dashboardid}/components/CardList/CardList.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { ReactEventHandler } from 'react'; | ||
import ColumnCard from '../ColumnCard/ColumnCard'; | ||
import { CardOverAll } from '../../../../api/apiModule'; | ||
|
||
interface CardListProps { | ||
cardList: CardOverAll[]; | ||
hasNext: boolean; | ||
columnData: { | ||
userId: number; | ||
columnId: number; | ||
dashboardId: number; | ||
}; | ||
setElement: React.Dispatch<React.SetStateAction<HTMLElement | null>>; | ||
handleCardOnclick: ReactEventHandler; | ||
} | ||
|
||
function CardList({ | ||
cardList, | ||
hasNext, | ||
columnData, | ||
setElement, | ||
handleCardOnclick, | ||
}: CardListProps) { | ||
return ( | ||
<div> | ||
{cardList.map((cardData) => ( | ||
<ColumnCard | ||
key={cardData.id} | ||
cardId={cardData.id} | ||
cardData={cardData} | ||
columnData={columnData} | ||
handleCardOnclick={handleCardOnclick} | ||
/> | ||
))} | ||
{hasNext && <div ref={setElement} style={{ height: '20px' }} />} | ||
</div> | ||
); | ||
} | ||
|
||
export default CardList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
164 changes: 140 additions & 24 deletions
164
src/pages/dashboard.{dashboardid}/components/Column/Column.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.