diff --git a/apps/web/src/app/withdrawal/page.tsx b/apps/web/src/app/withdrawal/page.tsx index 6d80c996..f63c36ae 100644 --- a/apps/web/src/app/withdrawal/page.tsx +++ b/apps/web/src/app/withdrawal/page.tsx @@ -6,7 +6,7 @@ export default function WithdrawalPage() {
- +
{/* 메인 콘텐츠 - 스크롤 가능 */} diff --git a/apps/web/src/components/common/BackHeader.tsx b/apps/web/src/components/common/BackHeader.tsx index 7b1ba92f..971964f2 100644 --- a/apps/web/src/components/common/BackHeader.tsx +++ b/apps/web/src/components/common/BackHeader.tsx @@ -3,17 +3,22 @@ import { useRouter } from "next/navigation"; import { Header } from "@/components/common/Header"; +import { goBackOrFallback } from "@/utils/navigation"; type BackHeaderProps = { title: string; + /** 새 탭·링크로 바로 들어와 돌아갈 기록이 없을 때 이동할 경로 */ + fallbackHref?: string; }; /** - * 뒤로가기 버튼이 있는 헤더. - * router.back()만 클라이언트에서 필요하므로, 페이지는 서버 컴포넌트로 두고 이 헤더만 클라이언트로 분리한다. + * 뒤로가기 버튼이 있는 헤더 + * 뒤로가기만 클라이언트에서 필요해 페이지는 서버 컴포넌트로 두고 이 헤더만 클라이언트로 분리함 */ -export const BackHeader = ({ title }: BackHeaderProps) => { +export const BackHeader = ({ title, fallbackHref = "/" }: BackHeaderProps) => { const router = useRouter(); - return
router.back()} title={title} />; + return ( +
goBackOrFallback(router, fallbackHref)} title={title} /> + ); }; diff --git a/apps/web/src/components/profile/EditProfileBottomSheet.tsx b/apps/web/src/components/profile/EditProfileBottomSheet.tsx index 7d32283e..e7cc3aca 100644 --- a/apps/web/src/components/profile/EditProfileBottomSheet.tsx +++ b/apps/web/src/components/profile/EditProfileBottomSheet.tsx @@ -220,7 +220,7 @@ export const EditProfileBottomSheet = ({