-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] 종료 미션 보관함 페이지 생성 #510
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
98c8bc1
refactor: 종료미션 페이지 분리
sumi-0011 98ec5ae
feat: 종료 미션 페이지 생성 및 API 연결
sumi-0011 59851db
feat: 종료 미션 디테일 페이지 생성
sumi-0011 d29b3f8
refactor: mission detail 공통 컴포넌트 분리 , history tab and 다이얼로그
sumi-0011 d14b679
feat: 종료 미션 페이지 생성
sumi-0011 186d6da
feat: 종료 미션 페이지 쿼리 추가
sumi-0011 453f7a8
feat: 백버튼 눌렀을 때 라우팅 경로 수정
sumi-0011 23ad17d
feat: 종료 미션 count 표시
sumi-0011 9d71137
refactor: 캘린더 컴포넌트 위치 변경 및 TODO 적어두기
sumi-0011 e2553a8
docs: todo 추가
sumi-0011 24ca36e
:art: Fix conflict with develop
woobottle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 was deleted.
Oops, something went wrong.
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,50 @@ | ||
import Link from 'next/link'; | ||
import { type GetFinishedMissionsResponse } from '@/apis/mission'; | ||
import { type MissionCategory } from '@/apis/schema/mission'; | ||
import Badge from '@/components/Badge/Badge'; | ||
import { TwoLineListItem } from '@/components/ListItem'; | ||
import { MISSION_CATEGORY_LABEL } from '@/constants/mission'; | ||
import { ROUTER } from '@/constants/router'; | ||
import { flex } from '@/styled-system/patterns'; | ||
import { type UseQueryResult } from '@tanstack/react-query'; | ||
|
||
interface Props { | ||
queryData: UseQueryResult<GetFinishedMissionsResponse>; | ||
} | ||
|
||
function FinishedMissionList({ queryData }: Props) { | ||
const { data } = queryData; | ||
|
||
const list = data ?? []; | ||
|
||
return ( | ||
<ul className={ulCss}> | ||
{list.map((item) => { | ||
const category = MISSION_CATEGORY_LABEL[item.category as MissionCategory]; | ||
return ( | ||
<Link key={item.missionId} href={ROUTER.RESULT.FINISHED_MISSION(item.missionId)}> | ||
<TwoLineListItem | ||
key={item.missionId} | ||
subName={category.label} | ||
name={item.name} | ||
imageUrl={category.imgUrl} | ||
badgeElement={ | ||
<Badge color="gray" variant="solid"> | ||
{item.missionAttainRate}% | ||
</Badge> | ||
} | ||
/> | ||
</Link> | ||
); | ||
})} | ||
</ul> | ||
); | ||
} | ||
|
||
export default FinishedMissionList; | ||
|
||
const ulCss = flex({ | ||
padding: '16px', | ||
gap: '8px', | ||
flexDirection: 'column', | ||
}); |
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,65 @@ | ||
'use client'; | ||
|
||
import { useGetMissionSummary } from '@/apis/mission'; | ||
import Character from '@/app/level/guide/Character'; | ||
import Banner from '@/components/Banner/Banner'; | ||
import LevelStatus from '@/components/LevelStatus/LevelStatus'; | ||
import MotionDiv from '@/components/Motion/MotionDiv'; | ||
import { css } from '@/styled-system/css'; | ||
import { grid } from '@/styled-system/patterns'; | ||
import { getLevel } from '@/utils/result'; | ||
|
||
function OverallStatus() { | ||
const { data, isLoading } = useGetMissionSummary(); | ||
|
||
const symbolStack = data?.symbolStack ?? 0; | ||
const currentLevel = getLevel(symbolStack); | ||
const totalTime = `${data?.totalMissionHour ?? 0}h ${data?.totalMissionMinute ?? 0}m`; | ||
const totalMissionAttainRate = `${data?.totalMissionAttainRate ?? 0}%`; | ||
|
||
return ( | ||
<> | ||
{isLoading ? ( | ||
// TODO : 스켈레톤 추가 | ||
<div></div> | ||
) : ( | ||
<> | ||
<MotionDiv variants="fadeInUp" className={imageSectionCss}> | ||
<Character width={280} height={210} level={currentLevel.level} isBackground /> | ||
</MotionDiv> | ||
<LevelStatus symbolStack={symbolStack} viewLevel={currentLevel.level} /> | ||
<MotionDiv className={bannerSectionCss}> | ||
<Banner | ||
type="card" | ||
description="전체 누적 시간" | ||
iconUrl="/assets/icons/graph/clock.png" | ||
title={totalTime} | ||
/> | ||
<Banner | ||
type="card" | ||
description="총 미션 달성률" | ||
iconUrl="/assets/icons/graph/chart.png" | ||
title={totalMissionAttainRate} | ||
/> | ||
</MotionDiv> | ||
</> | ||
)} | ||
</> | ||
); | ||
} | ||
|
||
export default OverallStatus; | ||
|
||
const bannerSectionCss = grid({ | ||
gridTemplateColumns: '1fr 1fr', | ||
padding: '20px 16px', | ||
gap: '10px', | ||
maxWidth: '376px', | ||
margin: '0 auto', | ||
}); | ||
|
||
const imageSectionCss = css({ | ||
margin: '43px auto 12px', | ||
position: 'relative', | ||
height: '210px', | ||
}); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
쿼리키 관련 나중에 이야기 하고 싶은데
여유있을때 같이 이야기 해보시졍~