Skip to content

Commit

Permalink
chore: 기록 수정 플로우 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
wokbjso committed Sep 8, 2024
1 parent b412ee8 commit c07502b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
21 changes: 6 additions & 15 deletions app/record/success/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ interface RecordSuccessPageProps {
export default function RecordSuccessPage({
searchParams,
}: RecordSuccessPageProps) {
const isEditMode = Boolean(searchParams.editMode);
return (
<div className={layoutStyles.full}>
<div className={layoutStyles.content}>
Expand All @@ -23,20 +22,12 @@ export default function RecordSuccessPage({
priority
alt="success record"
/>
<h3 className={textStyles.title}>
{isEditMode ? '수정' : '기록'} 완료!
</h3>
{isEditMode ? (
<p className={textStyles.paragraph}>
기록 수정이 성공적으로 완료되었어요.
</p>
) : (
<p className={textStyles.paragraph}>
{searchParams.month}{' '}
<span className={textStyles.sub}>{searchParams.rank}번째</span>{' '}
기록이에요.
</p>
)}
<h3 className={textStyles.title}>기록 완료!</h3>
<p className={textStyles.paragraph}>
{searchParams.month}{' '}
<span className={textStyles.sub}>{searchParams.rank}번째</span>{' '}
기록이에요.
</p>
</div>
<Link
href={`/record-detail/${searchParams.memoryId}`}
Expand Down
5 changes: 2 additions & 3 deletions features/record/components/organisms/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,8 @@ export function Form({ prevSwimStartTime, prevSwimEndTime }: FormProps) {

const handleRecordEditSuccess = () => {
handlers.onChangeIsLoading(false);
router.replace(
`/record/success?editMode=true&memoryId=${Number(memoryId)}`,
);
router.replace(`/record-detail/${Number(memoryId)}`);
toast('기록 수정이 완료되었어요.', { type: 'success' });
setFormSubInfo({
imageFiles: [],
isDistanceLapModified: false,
Expand Down

0 comments on commit c07502b

Please sign in to comment.