-
Notifications
You must be signed in to change notification settings - Fork 2
[feat] 주요활동 선택 스텝 리뉴얼 #513
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
base: develop
Are you sure you want to change the base?
Changes from all commits
0bed44d
27ba0f4
777985a
95e9cbe
12b7325
40f5505
5fccccf
c0de482
5352c55
9c4f46e
1a32382
190879b
8d9f75d
01d464a
216fc39
9b7ca78
7796ad8
5f716c8
c61e9ae
af7c65b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { useQuery } from '@tanstack/react-query'; | ||
|
|
||
| import { HTTPMethod, request } from '@apis/config/request'; | ||
|
|
||
| import { API_ENDPOINT } from '@constants/apiEndpoints'; | ||
| import { queryKeys } from '@constants/queryKey'; | ||
|
|
||
| import type { ActivitiesResponse } from '../../types/apis/activityInfo'; | ||
|
|
||
| export const getActivities = async (): Promise<ActivitiesResponse> => { | ||
| return request<ActivitiesResponse>({ | ||
| method: HTTPMethod.GET, | ||
| url: API_ENDPOINT.IMAGE_SETUP.ACTIVITIES, | ||
| }); | ||
| }; | ||
|
|
||
| export const useActivitiesQuery = () => { | ||
| return useQuery({ | ||
| queryKey: queryKeys.imageSetup.activities(), | ||
| queryFn: getActivities, | ||
| staleTime: Infinity, | ||
| gcTime: 1000 * 60 * 60 * 24, | ||
| }); | ||
| }; |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import { useQuery } from '@tanstack/react-query'; | ||
|
|
||
| import { HTTPMethod, request } from '@apis/config/request'; | ||
|
|
||
| import { API_ENDPOINT } from '@constants/apiEndpoints'; | ||
| import { queryKeys } from '@constants/queryKey'; | ||
|
|
||
| import type { FurnitureCategoriesResponse } from '../../types/apis/activityInfo'; | ||
|
|
||
| export const getFurnitureCategories = | ||
| async (): Promise<FurnitureCategoriesResponse> => { | ||
| return request<FurnitureCategoriesResponse>({ | ||
| method: HTTPMethod.GET, | ||
| url: API_ENDPOINT.IMAGE_SETUP.FURNITURE_CATEGORIES, | ||
| }); | ||
| }; | ||
|
|
||
| export const useFurnitureCategoriesQuery = () => { | ||
| return useQuery({ | ||
| queryKey: queryKeys.imageSetup.furnitureCategories(), | ||
| queryFn: getFurnitureCategories, | ||
| staleTime: Infinity, | ||
| gcTime: 1000 * 60 * 60 * 24, | ||
| }); | ||
| }; |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,24 +1,35 @@ | ||||||||||||||||||||||||||||||||||
| import { overlay } from 'overlay-kit'; | ||||||||||||||||||||||||||||||||||
| import { useNavigate } from 'react-router-dom'; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| import TitleNavBar from '@components/navBar/TitleNavBar'; | ||||||||||||||||||||||||||||||||||
| import Popup from '@components/overlay/popup/Popup'; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| import TitleNavBar from '@/shared/components/v2/navBar/TitleNavBar'; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| import * as styles from './FunnelLayout.css'; | ||||||||||||||||||||||||||||||||||
| import { | ||||||||||||||||||||||||||||||||||
| logSelectHouseInfoClickModalContinue, | ||||||||||||||||||||||||||||||||||
| logSelectHouseInfoClickModalExit, | ||||||||||||||||||||||||||||||||||
| logSelectHouseInfoViewModal, | ||||||||||||||||||||||||||||||||||
| } from '../../utils/analytics'; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| type FunnelStepKey = 'FloorPlanSelect' | 'InteriorStyle' | 'ActivityInfo'; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| // 퍼널 스텝 별 NavBar 타이틀 매핑 | ||||||||||||||||||||||||||||||||||
| const NAVBAR_TITLE_BY_STEP: Record<FunnelStepKey, string> = { | ||||||||||||||||||||||||||||||||||
| FloorPlanSelect: '공간 선택하기', | ||||||||||||||||||||||||||||||||||
| InteriorStyle: '취향 선택하기', | ||||||||||||||||||||||||||||||||||
| ActivityInfo: '가구 선택하기', | ||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+15
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial
♻️ 타입 export 제안-type FunnelStepKey = 'FloorPlanSelect' | 'InteriorStyle' | 'ActivityInfo';
+export type FunnelStepKey = 'FloorPlanSelect' | 'InteriorStyle' | 'ActivityInfo';📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| interface FunnelLayoutProps { | ||||||||||||||||||||||||||||||||||
| children: React.ReactNode; | ||||||||||||||||||||||||||||||||||
| currentStep: 'FloorPlanSelect' | 'InteriorStyle' | 'ActivityInfo'; | ||||||||||||||||||||||||||||||||||
| currentStep: FunnelStepKey; | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| const FunnelLayout = ({ children, currentStep }: FunnelLayoutProps) => { | ||||||||||||||||||||||||||||||||||
| const navigate = useNavigate(); | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| // TODO: 퍼널 전체 탈출 가드 useBlocker로 바꾸기 | ||||||||||||||||||||||||||||||||||
| const handleBackClick = () => { | ||||||||||||||||||||||||||||||||||
| if (currentStep === 'FloorPlanSelect') { | ||||||||||||||||||||||||||||||||||
| logSelectHouseInfoViewModal(); | ||||||||||||||||||||||||||||||||||
|
|
@@ -43,10 +54,8 @@ const FunnelLayout = ({ children, currentStep }: FunnelLayoutProps) => { | |||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||
| <div className={styles.wrapper}> | ||||||||||||||||||||||||||||||||||
| <TitleNavBar | ||||||||||||||||||||||||||||||||||
| // TODO: 각 스텝별 헤더 타이틀 설정하기 | ||||||||||||||||||||||||||||||||||
| title="스타일링 이미지 생성" | ||||||||||||||||||||||||||||||||||
| isBackIcon={true} | ||||||||||||||||||||||||||||||||||
| isLoginBtn={false} | ||||||||||||||||||||||||||||||||||
| title={NAVBAR_TITLE_BY_STEP[currentStep]} | ||||||||||||||||||||||||||||||||||
| backLabel="이전" | ||||||||||||||||||||||||||||||||||
| onBackClick={ | ||||||||||||||||||||||||||||||||||
| currentStep === 'FloorPlanSelect' ? handleBackClick : undefined | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
Comment on lines
59
to
61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new header wiring passes Useful? React with 👍 / 👎. |
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
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.
MSW 초기화 실패 시 앱이 렌더링되지 않는 경로가 있습니다.
현재는
enableMocking()성공 시에만render가 실행됩니다. 초기화 실패 시에도 앱은 뜨도록 fallback을 보장해야 합니다.🛠️ 제안 수정안
🤖 Prompt for AI Agents