Skip to content

Commit d967c5c

Browse files
authored
Merge pull request #257 from DDD-Community/fix/mypage
FIX: 마이페이지 변경된 시안에 맞춰 수정
2 parents 6d0520c + 48c8ec4 commit d967c5c

50 files changed

Lines changed: 854 additions & 404 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

public/my-page/starbucks-drink.png

2.56 KB
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { CreateGoalForm } from '@/composite/goal';
2+
3+
export default function GoalCreatePageRoute() {
4+
return <CreateGoalForm />;
5+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
'use client';
2+
3+
import Button from '@/shared/components/input/Button';
4+
import { ROUTES } from '@/shared/constants/routes';
5+
import { useRouter } from 'next/router';
6+
7+
export default function GoalEditErrorPage() {
8+
const router = useRouter();
9+
return (
10+
<div className="flex flex-col items-center justify-center min-h-screen bg-[#1B1C1E] px-6">
11+
<div className="flex flex-col items-center gap-6 max-w-md w-full">
12+
<h2 className="headline-1-bold text-text-strong text-center">목표를 찾을 수 없습니다</h2>
13+
<p className="body-1-normal text-label-neutral text-center">
14+
요청하신 목표가 존재하지 않거나 유효하지 않은 접근입니다.
15+
</p>
16+
<Button size="lg" text="목표 목록으로 돌아가기" className="w-full" onClick={() => router.back()} />
17+
</div>
18+
</div>
19+
);
20+
}
File renamed without changes.
File renamed without changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import GoalEditFormContent from '@/composite/goal/edit';
2+
import { notFound } from 'next/navigation';
3+
4+
type GoalEditPageProps = {
5+
params: Promise<{ goalId: string }>;
6+
};
7+
8+
export default async function GoalEditPage({ params }: GoalEditPageProps) {
9+
const resolvedParams = await params;
10+
const goalId = resolvedParams.goalId;
11+
if (!goalId || goalId === 'null' || goalId === undefined) notFound();
12+
13+
return <GoalEditFormContent goalId={goalId} />;
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export default function EndedGoalsListLoader() {
2+
return (
3+
<div className="flex-1 overflow-y-auto">
4+
<nav className="px-2 pt-8 pb-4 w-full border-b border-line-normal flex items-center justify-start">
5+
<div className="w-8 h-8 bg-elevated-normal rounded" />
6+
</nav>
7+
<ul className="grid grid-cols-2 w-full place-items-center gap-4 pt-5 pb-16 px-5">
8+
{[1, 2, 3, 4, 5, 6, 7, 8].map(i => (
9+
<li key={i} className="h-40 w-40 bg-elevated-normal rounded animate-pulse" />
10+
))}
11+
</ul>
12+
</div>
13+
);
14+
}

src/app/(home)/goal/ended/page.tsx renamed to src/app/(home)/goal/@stack/(.)ended/page.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use client';
2-
31
import EndedGoalsContainer from '@/composite/goal/ended';
42

53
export default function EndedGoalsPage() {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function GoalStackPageRoute() {
2+
return null;
3+
}

src/app/(home)/goal/create/page.tsx

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)