Skip to content

Commit 2e641c6

Browse files
committed
Merge branch 'develop' into feat/#187/loginState
2 parents 44b39f3 + bc861a7 commit 2e641c6

File tree

74 files changed

+1539
-1805
lines changed

Some content is hidden

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

74 files changed

+1539
-1805
lines changed

src/api/domain/edit/hook.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const useUpperGoalIds = (mandalartId: number) => {
2222
return useQuery({
2323
queryKey: EDIT_QUERY_KEY.upperGoalIds(mandalartId),
2424
queryFn: () => getUpperGoalIds(mandalartId),
25+
enabled: !!mandalartId,
2526
});
2627
};
2728

@@ -31,10 +32,13 @@ export const useSubGoals = (
3132
cycle?: CycleType,
3233
options?: Omit<UseQueryOptions<BaseResponse<SubGoalsResponse>>, 'queryKey' | 'queryFn'>,
3334
) => {
35+
const enabled = !!mandalartId && (options?.enabled ?? true);
36+
3437
return useQuery({
3538
queryKey: EDIT_QUERY_KEY.subGoals(mandalartId, coreGoalId, cycle),
3639
queryFn: () => getSubGoals(mandalartId, coreGoalId, cycle),
3740
...options,
41+
enabled,
3842
});
3943
};
4044

@@ -61,5 +65,6 @@ export const useCoreGoals = (mandalartId: number) => {
6165
return useQuery({
6266
queryKey: EDIT_QUERY_KEY.coreGoals(mandalartId),
6367
queryFn: () => getCoreGoals(mandalartId),
68+
enabled: !!mandalartId,
6469
});
6570
};

src/api/domain/history/hook/useGetHistory.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ export const useGetHistory = (mandalartId: number) => {
88
return useQuery<historyResponse>({
99
queryKey: QUERY_KEY.HISTORY(mandalartId),
1010
queryFn: () => getHistory(mandalartId),
11+
enabled: !!mandalartId,
1112
});
1213
};

src/api/domain/history/hook/useGetStreak.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ export const useGetStreak = (mandalartId: number) => {
88
return useQuery<StreakResponse>({
99
queryKey: QUERY_KEY.STREAK(mandalartId),
1010
queryFn: () => getStreak(mandalartId),
11+
enabled: !!mandalartId,
1112
});
1213
};

src/api/domain/lowerTodo/hook/useCoreGoals.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ export const useCoreGoals = (mandalartId: number) => {
88
return useQuery({
99
queryKey: QUERY_KEY.MANDALART_CORE_GOALS(mandalartId),
1010
queryFn: () => getCoreGoals(mandalartId),
11+
enabled: !!mandalartId,
1112
});
1213
};

src/api/domain/mandalAll/hook.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ export const useMandalAll = (mandalartId: number) => {
1111
return useQuery({
1212
queryKey: MANDAL_ALL_KEY.detail(mandalartId),
1313
queryFn: () => getMandalAll(mandalartId),
14+
enabled: !!mandalartId,
1415
});
1516
};

src/api/domain/myTodo/hook/useGetRecommendation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ export const useGetRecommendation = (mandalartId: number, date: string) => {
77
return useQuery({
88
queryKey: [QUERY_KEY.RECOMMENDED_TODO(mandalartId), date],
99
queryFn: () => getRecommendation(mandalartId, { date }),
10+
enabled: !!mandalartId,
1011
});
1112
};

src/api/domain/myTodo/hook/useMyMandal.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ export const useGetMandalAll = (mandalartId: number) => {
1919
return useQuery({
2020
queryKey: [QUERY_KEY.ENTIRE_GOAL, mandalartId],
2121
queryFn: () => getMandalAll(mandalartId),
22+
enabled: !!mandalartId,
2223
});
2324
};
2425

2526
export const useGetMandalCoreGoals = (mandalartId: number) => {
2627
return useQuery<MandalCoreGoalsResponse>({
2728
queryKey: [QUERY_KEY.CORE_GOALS, mandalartId],
2829
queryFn: () => getMandalCoreGoals(mandalartId),
30+
enabled: !!mandalartId,
2931
});
3032
};
3133

src/api/domain/upperTodo/hook.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const useGetMandalAll = (mandalartId: number) => {
1616
return useQuery({
1717
queryKey: [QUERY_KEY.ENTIRE_GOAL, mandalartId],
1818
queryFn: () => getMandalAll(mandalartId),
19+
enabled: !!mandalartId,
1920
});
2021
};
2122

src/api/domain/upperTodo/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const getMandalAll = async (mandalartId: number) => {
1515
};
1616

1717
export const getCoreGoalIdPositions = async (mandalartId: number) => {
18-
const res = await axiosInstance.get<BaseResponse<{ coreGoalIds: CoreGoalIdPosition[] }>>( // 응답 구조 변경
18+
const res = await axiosInstance.get<BaseResponse<{ coreGoalIds: CoreGoalIdPosition[] }>>(
1919
`/${END_POINT.MANDALART}/${mandalartId}/${END_POINT.CORE_GOAL}/id-positions`,
2020
);
2121
return res.data.data;

src/common/component/MandalartTextField/MandalartTextField.css.ts

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

0 commit comments

Comments
 (0)