Repository navigation
feat: 견적 관리 리팩토링, 지정 기사 표시, 로그인·공유 연동 #33
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
84a992d
refactor: 견적 관리 상세·훅·상태 UI 중복 정리
4896f2e
feat: 지정 견적 요청 기사님 정보 표시
26a03f0
Merge branch 'dev' of https://github.com/4roro-moving/moving-frontend…
df47be1
feat: 로그인 구조 반영 및 견적 관리 연동
b4cb934
feat: 견적 소셜 공유 기능 연동
c24cc9d
fix: 견적 상세 접근성·공유·레이아웃 리뷰 반영
8b71c43
Merge remote-tracking branch 'origin/dev' into refactor/estimate-mana…
6d067f5
fix: facebook 공유 반환값 문서와 spacing 토큰명 정리
a50cc31
fix: 고객 인증 가드·견적 요청 완료 CTA 리뷰 반영
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 hidden or 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,6 +1,8 @@ | ||
| import { redirect } from "next/navigation"; | ||
|
|
||
| import { APP_ROUTES } from "@/lib/constants/appRoutes"; | ||
|
|
||
| // 2026.07.24 정슬기 - [추가] /estimates 진입 시 받았던 견적 목록으로 이동 | ||
| export default function EstimatesIndexPage() { | ||
| redirect("/estimates/received"); | ||
| redirect(APP_ROUTES.ESTIMATES.RECEIVED); | ||
| } |
This file contains hidden or 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 @@ | ||
| "use client"; | ||
|
|
||
| import { usePathname, useRouter } from "next/navigation"; | ||
| import { useEffect, type ReactNode } from "react"; | ||
|
|
||
| import EstimatesQueryStatus from "@/components/estimate/EstimatesQueryStatus"; | ||
| import { useCustomerAuthReady } from "@/hooks/useCustomerAuthReady"; | ||
| import { buildLoginPath } from "@/lib/auth/redirect"; | ||
|
|
||
| interface CustomerAuthGateProps { | ||
| children: ReactNode; | ||
| /** 세션 확인 중 표시. 기본은 공통 로딩 메시지 */ | ||
| loadingMessage?: string; | ||
| } | ||
|
|
||
| /** | ||
| * 고객 전용 영역 가드 | ||
| * - 세션 복구 중: 로딩 | ||
| * - 비로그인: 로그인 페이지로 이동 (?redirect=) | ||
| * - 기사님: 받은 견적 요청 목록으로 이동 | ||
| * // 2026.07.30 정슬기 - [추가] | ||
| */ | ||
| export default function CustomerAuthGate({ | ||
| children, | ||
| loadingMessage = "로그인 상태를 확인하는 중입니다.", | ||
| }: CustomerAuthGateProps) { | ||
| const router = useRouter(); | ||
| const pathname = usePathname(); | ||
| const { isPending, isAuthenticated, isMover, canAccess } = useCustomerAuthReady(); | ||
|
|
||
| useEffect(() => { | ||
| if (isPending) return; | ||
|
|
||
| if (!isAuthenticated) { | ||
| const search = typeof window !== "undefined" ? window.location.search : ""; | ||
| window.location.assign(buildLoginPath(`${pathname}${search}`)); | ||
| return; | ||
| } | ||
|
|
||
| if (isMover) { | ||
| router.replace("/estimate/received-requests"); | ||
| } | ||
| }, [isPending, isAuthenticated, isMover, pathname, router]); | ||
|
|
||
| if (isPending || !canAccess) { | ||
| return <EstimatesQueryStatus message={loadingMessage} />; | ||
| } | ||
|
|
||
| return children; | ||
| } | ||
This file contains hidden or 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 hidden or 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
17 changes: 12 additions & 5 deletions
17
...mate/received/ReceivedEstimatesStatus.tsx → ...ponents/estimate/EstimatesQueryStatus.tsx
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.