-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aad0cb5
commit 8a20c42
Showing
6 changed files
with
68 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import Image from 'next/image'; | ||
import React from 'react'; | ||
import type { ShareApplicantData } from '@/types/share'; | ||
import { returnProfileImg } from '@/utils/returnProfileImg'; | ||
|
||
const ShareApplicantListItem: React.FC<{ | ||
idx: number; | ||
data: ShareApplicantData; | ||
}> = ({ idx, data }) => { | ||
return ( | ||
<div className="flex items-center mb-[20px]"> | ||
<p className="flex justify-center items-center w-[20px] h-[20px] rounded-full bg-gray0 body2-semibold text-gray5"> | ||
{idx} | ||
</p> | ||
<Image | ||
src={returnProfileImg(data.profileImage)} | ||
width={40} | ||
height={40} | ||
className="w-[40px] h-[40px] aspect-square mx-[8px]" | ||
alt="신청자 프로필" | ||
/> | ||
<p className="text-gray7 heading4-semibold">{data.nickname}</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ShareApplicantListItem; |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export { default as useGetShares } from './useGetShares'; | ||
export { default as useGetShareDetail } from './useGetShareDetail'; | ||
export { default as useGetShareApplicants } from './useGetShareApplicants'; |
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,21 @@ | ||
import type { ShareApplicantData } from '@/types/share'; | ||
import { queryKeys } from '../queryKeys'; | ||
import { useBaseQuery } from '../useBaseQuery'; | ||
|
||
const useGetShareApplicants = ({ | ||
id, | ||
}: { | ||
id: string | string[] | undefined; | ||
}) => { | ||
if (typeof id !== 'string') { | ||
return null; | ||
} | ||
const { data } = useBaseQuery<ShareApplicantData[]>( | ||
queryKeys.SHARE_APPLICANTS(), | ||
`/shares/${id}/applies`, | ||
); | ||
|
||
return data?.data; | ||
}; | ||
|
||
export default useGetShareApplicants; |
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