-
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
Feat/#158 뱃지 목록 조회 기능 구현
- Loading branch information
Showing
12 changed files
with
129 additions
and
76 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,7 +1,7 @@ | ||
import BadgeListDetail from '@/containers/profile/BadgeListDetail'; | ||
|
||
const page = () => { | ||
return <BadgeListDetail />; | ||
const page = ({ params }: { params: { nickname: string } }) => { | ||
return <BadgeListDetail nickname={params.nickname} />; | ||
}; | ||
|
||
export default page; |
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,31 +1,7 @@ | ||
'use client'; | ||
|
||
import BadgeList from '@/containers/profile/BadgeList'; | ||
import BuddyPoint from '@/containers/profile/BuddyPoint'; | ||
import MyParticipation from '@/containers/profile/MyParticipation'; | ||
import ProfileInfo from '@/containers/profile/ProfileInfo'; | ||
import ReviewList from '@/containers/profile/ReviewList'; | ||
import Profile from '@/containers/profile/Profile'; | ||
|
||
const Page = ({ params }: { params: { nickname: string } }) => { | ||
return ( | ||
<div className="items-center p-4"> | ||
<div className="pb-4"> | ||
<ProfileInfo | ||
nickname={decodeURIComponent(params.nickname)} | ||
description="자기소개" | ||
rank={null} | ||
/> | ||
<BuddyPoint score={50} /> | ||
<BadgeList badges={[]} /> | ||
<ReviewList | ||
totalExcellentCount={0} | ||
totalGoodCount={2} | ||
totalBadCount={0} | ||
/> | ||
<MyParticipation joinCount={2} /> | ||
</div> | ||
</div> | ||
); | ||
return <Profile nickname={params.nickname} />; | ||
}; | ||
|
||
export default Page; |
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
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,33 @@ | ||
import { API_BASE_URL } from '@/constants/env'; | ||
import { http, HttpResponse } from 'msw'; | ||
|
||
export const getBadgeList = http.get( | ||
`${API_BASE_URL}/api/badges/:nickname`, | ||
async () => { | ||
const result = { | ||
status: 'success', | ||
data: { | ||
badges: [ | ||
{ | ||
badgeImageS3SavedURL: '', | ||
}, | ||
{ | ||
badgeImageS3SavedURL: '', | ||
}, | ||
{ | ||
badgeImageS3SavedURL: '', | ||
}, | ||
{ | ||
badgeImageS3SavedURL: '', | ||
}, | ||
{ | ||
badgeImageS3SavedURL: '', | ||
}, | ||
], | ||
}, | ||
message: '뱃지가 조회되었습니다.', | ||
}; | ||
|
||
return HttpResponse.json(result, { status: 200 }); | ||
}, | ||
); |
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,3 @@ | ||
import { getBadgeList } from './[nickname]'; | ||
|
||
export const badgeHandlers = [getBadgeList]; |
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