-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
#118 [FEAT] 명함 보기 페이지에서 명함 조회, 상세 조회, 수정 API 연결
- Loading branch information
Showing
10 changed files
with
229 additions
and
284 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export { getGroupList, postGroup, deleteGroup, putGroup } from './group'; | ||
export { getCards, getCardDetail, postCards, deleteCards, putCards, searchCards } from './cards'; | ||
export { getMyCard, postMyCard, deleteMyCard, putMyCard } from './myCard'; |
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
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,18 @@ | ||
import { useCallback } from 'react'; | ||
|
||
function useFormData(data) { | ||
return useCallback(() => { | ||
const formData = new FormData(); | ||
|
||
// 객체의 모든 키-값 쌍을 FormData에 추가 | ||
for (let key in data) { | ||
if (data.hasOwnProperty(key) && data[key]) { | ||
formData.append(key, data[key]); | ||
} | ||
} | ||
|
||
return formData; | ||
}, [data]); | ||
} | ||
|
||
export default useFormData; |
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.