File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -13,17 +13,19 @@ interface UpdateLinkBody {
1313
1414interface LinkCardStore {
1515 linkCardList : LinkData [ ] ;
16- setLinkCardList : ( list : LinkData [ ] ) => void ;
16+ setLinkCardList : ( list : LinkData [ ] , totalCount : number ) => void ;
1717 updateLink : ( linkId : number , body : UpdateLinkBody ) => Promise < void > ;
1818 deleteLink : ( linkId : number ) => Promise < void > ;
1919 updateFavorite : ( linkId : number , favorite : boolean ) => Promise < void > ;
20+ totalCount : number ;
2021}
2122
22- export const useLinkCardStore = create < LinkCardStore > ( ( set ) => ( {
23+ export const useLinkCardStore = create < LinkCardStore > ( ( set , get ) => ( {
2324 linkCardList : [ ] ,
25+ totalCount : 0 ,
2426
25- setLinkCardList : ( list : LinkData [ ] ) => {
26- set ( { linkCardList : list } ) ;
27+ setLinkCardList : ( list : LinkData [ ] , totalCount : number ) => {
28+ set ( { linkCardList : list , totalCount : totalCount } ) ;
2729 } ,
2830
2931 // 수정 요청 보낸 후 목록 가져오기
You can’t perform that action at this time.
0 commit comments