Skip to content

Commit a62e1be

Browse files
committed
Merge branch 'main' into pre-production
2 parents 78e7654 + 80c803d commit a62e1be

File tree

20 files changed

+48
-79
lines changed

20 files changed

+48
-79
lines changed

apps/service/src/app/(home)/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Button } from '@components';
66
import { IcCalendar } from '@svg';
77
import { useGetHomeFeed } from '@apis';
88
import { DailyProgress } from '@types';
9-
import { useTrackEvent } from '@hooks';
9+
import { trackEvent } from '@utils';
1010
import {
1111
GuideButton,
1212
HomeHeader,
@@ -17,7 +17,6 @@ import {
1717

1818
const Page = () => {
1919
const router = useRouter();
20-
const { trackEvent } = useTrackEvent();
2120
const { data } = useGetHomeFeed();
2221
const homeFeedData = data?.data;
2322

apps/service/src/app/login/page.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
import { useEffect } from 'react';
33
import { useRouter } from 'next/navigation';
44

5-
import { useTrackEvent } from '@hooks';
6-
import { getAccessToken } from '@utils';
5+
import { getAccessToken, trackEvent } from '@utils';
76
import { LogoLogin } from '@/assets/svg/logo';
87
import { KakaoButton } from '@/components/login';
98

109
const Page = () => {
11-
const { trackEvent } = useTrackEvent();
1210
const router = useRouter();
1311
const kakaoLoginUrl = `https://kauth.kakao.com/oauth/authorize?client_id=${
1412
process.env.NEXT_PUBLIC_REST_API_KEY

apps/service/src/app/problem/solve/[publishId]/[problemId]/SolveButtonsClient.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { useRouter } from 'next/navigation';
33

44
import { SolveButton } from '@components';
55
import { useGetChildData, postChildProblemSubmit, postProblemSubmit } from '@apis';
6-
import { useInvalidate, useTrackEvent } from '@hooks';
6+
import { useInvalidate } from '@hooks';
7+
import { trackEvent } from '@utils';
78

89
interface SolveButtonsClientProps {
910
publishId: string;
@@ -13,7 +14,6 @@ interface SolveButtonsClientProps {
1314
const SolveButtonsClient = ({ publishId, problemId }: SolveButtonsClientProps) => {
1415
const router = useRouter();
1516
const { invalidateAll } = useInvalidate();
16-
const { trackEvent } = useTrackEvent();
1717
const { data } = useGetChildData(publishId, problemId);
1818
const childProblemId = data?.data?.childProblemIds[0];
1919

apps/service/src/app/problem/solve/[publishId]/[problemId]/child-problem/[childProblemId]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ import {
1919
Tag,
2020
ImageContainer,
2121
} from '@components';
22-
import { useInvalidate, useModal, useTrackEvent } from '@hooks';
22+
import { useInvalidate, useModal } from '@hooks';
2323
import { components } from '@schema';
2424
import { useChildProblemContext } from '@/hooks/problem';
25+
import { trackEvent } from '@utils';
2526

2627
type ChildProblemSubmitUpdateResponse = components['schemas']['ChildProblemSubmitUpdateResponse'];
2728

@@ -32,7 +33,6 @@ const Page = () => {
3233
childProblemId: string;
3334
}>();
3435
const router = useRouter();
35-
const { trackEvent } = useTrackEvent();
3636
const { childProblemLength, mainProblemImageUrl, onPrev, onNext } = useChildProblemContext();
3737
const { invalidateAll } = useInvalidate();
3838

apps/service/src/app/problem/solve/[publishId]/[problemId]/main-problem/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ import {
1717
TimeTag,
1818
ImageContainer,
1919
} from '@components';
20-
import { useInvalidate, useModal, useTrackEvent } from '@hooks';
20+
import { useInvalidate, useModal } from '@hooks';
2121
import { ProblemStatus } from '@types';
2222
import { useChildProblemContext } from '@/hooks/problem';
23+
import { trackEvent } from '@utils';
2324

2425
const statusLabel: Record<string, string> = {
2526
CORRECT: '정답',
@@ -38,7 +39,6 @@ const statusColor: Record<string, 'green' | 'red' | 'gray'> = {
3839
const Page = () => {
3940
const { publishId, problemId } = useParams<{ publishId: string; problemId: string }>();
4041
const router = useRouter();
41-
const { trackEvent } = useTrackEvent();
4242
const { childProblemLength } = useChildProblemContext();
4343
const { invalidateAll } = useInvalidate();
4444

apps/service/src/app/report/[publishId]/[problemId]/advanced/page.tsx

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ import { useParams, useRouter } from 'next/navigation';
33
import Image from 'next/image';
44

55
import { NavigationFooter, SmallButton, ProgressHeader, ImageContainer } from '@components';
6-
import { useTrackEvent } from '@hooks';
6+
import { trackEvent } from '@utils';
77
import { useReportContext } from '@/hooks/report';
88

99
const Page = () => {
1010
const { publishId, problemId } = useParams();
1111
const router = useRouter();
12-
const { trackEvent } = useTrackEvent();
1312

1413
const { problemNumber, seniorTipImageUrl, prescription } = useReportContext();
1514

@@ -21,17 +20,13 @@ const Page = () => {
2120
};
2221

2322
const handleClickPrev = () => {
24-
trackEvent('report_advanced_prev_button_click', {
25-
buttonLabel: '해설',
26-
});
27-
router.push(`/report/${publishId}/${problemId}/analysis`);
23+
trackEvent('report_advanced_prev_button_click_to_prescription');
24+
router.push(`/report/${publishId}/${problemId}/prescription`);
2825
};
2926

3027
const handleClickNext = () => {
31-
trackEvent('report_advanced_next_button_click', {
32-
buttonLabel: '포인팅',
33-
});
34-
router.push(`/report/${publishId}/${problemId}/prescription`);
28+
trackEvent('report_advanced_next_button_click_to_list');
29+
router.push(`/problem/list/${publishId}`);
3530
};
3631

3732
if (!seniorTipImageUrl) {
@@ -40,7 +35,7 @@ const Page = () => {
4035

4136
return (
4237
<>
43-
<ProgressHeader progress={66} />
38+
<ProgressHeader progress={100} />
4439
<main className='px-[2rem] py-[8rem]'>
4540
<div className='flex items-center justify-between'>
4641
<h1 className='font-bold-18 text-main my-[0.8rem]'>한 걸음 더</h1>
@@ -57,16 +52,16 @@ const Page = () => {
5752
<Image
5853
src={seniorTipImageUrl ?? ''}
5954
alt='advanced'
60-
className={`w-full rounded-[1.6rem] object-contain`}
55+
className={`w-full object-contain`}
6156
width={700}
6257
height={200}
6358
priority
6459
/>
6560
</ImageContainer>
6661
</div>
6762
<NavigationFooter
68-
prevLabel='해설'
69-
nextLabel='포인팅'
63+
prevLabel='포인팅'
64+
nextLabel='리스트로'
7065
onClickPrev={handleClickPrev}
7166
onClickNext={handleClickNext}
7267
/>

apps/service/src/app/report/[publishId]/[problemId]/analysis/page.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ import Image from 'next/image';
55

66
import { IcRight, IcThumbtack } from '@svg';
77
import { ImageContainer, NavigationFooter, ProgressHeader } from '@components';
8-
import { useTrackEvent } from '@hooks';
8+
import { trackEvent } from '@utils';
99
import { useReportContext } from '@/hooks/report';
1010
import { TabMenu } from '@/components/report';
1111

1212
const Page = () => {
1313
const router = useRouter();
1414
const { publishId, problemId } = useParams();
15-
const { trackEvent } = useTrackEvent();
1615
const {
1716
problemNumber,
1817
answerType,
@@ -35,10 +34,8 @@ const Page = () => {
3534
};
3635

3736
const handleClickNext = () => {
38-
trackEvent('report_analysis_next_button_click', {
39-
buttonLabel: '한 걸음 더',
40-
});
41-
router.push(`/report/${publishId}/${problemId}/advanced`);
37+
trackEvent('report_analysis_next_button_click_to_prescription');
38+
router.push(`/report/${publishId}/${problemId}/prescription`);
4239
};
4340

4441
if (!mainAnalysisImageUrl || !mainHandwritingExplanationImageUrl) {
@@ -102,7 +99,7 @@ const Page = () => {
10299
<IcRight width={24} height={24} />
103100
</button>
104101
</div>
105-
<NavigationFooter nextLabel='한 걸음 더' onClickNext={handleClickNext} />
102+
<NavigationFooter nextLabel='포인팅' onClickNext={handleClickNext} />
106103
</main>
107104
</>
108105
);

apps/service/src/app/report/[publishId]/[problemId]/prescription/detail/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const Page = () => {
3434

3535
return (
3636
<>
37-
<Header title='진단 및 처방' iconType='back' />
37+
<Header title='포인팅' iconType='back' />
3838
<main className='px-[2rem] py-[8rem]'>
3939
<h1 className='font-bold-18 text-main my-[0.8rem]'>{title}</h1>
4040
<div className='mt-[1.6rem] flex flex-col gap-[1.6rem]'>

apps/service/src/app/report/[publishId]/[problemId]/prescription/page.tsx

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
import { useParams, useRouter } from 'next/navigation';
33

44
import { Divider, NavigationFooter, ProgressHeader } from '@components';
5-
import { useTrackEvent } from '@hooks';
5+
import { trackEvent } from '@utils';
66
import { PrescriptionCard } from '@/components/report';
77
import { useReportContext } from '@/hooks/report';
88

99
const Page = () => {
1010
const router = useRouter();
1111
const { publishId, problemId } = useParams();
12-
const { trackEvent } = useTrackEvent();
1312

1413
const { problemNumber, prescription } = useReportContext();
1514
const childProblems = prescription?.childProblem ?? [];
@@ -32,22 +31,18 @@ const Page = () => {
3231
};
3332

3433
const handleClickPrev = () => {
35-
trackEvent('report_prescription_prev_button_click', {
36-
buttonLabel: '한 걸음 더',
37-
});
38-
router.push(`/report/${publishId}/${problemId}/advanced`);
34+
trackEvent('report_prescription_prev_button_click_to_analysis');
35+
router.push(`/report/${publishId}/${problemId}/analysis`);
3936
};
4037

4138
const handleClickNext = () => {
42-
trackEvent('report_prescription_next_button_click', {
43-
buttonLabel: '리스트로',
44-
});
45-
router.push(`/problem/list/${publishId}`);
39+
trackEvent('report_prescription_next_button_click_to_advanced');
40+
router.push(`/report/${publishId}/${problemId}/advanced`);
4641
};
4742

4843
return (
4944
<>
50-
<ProgressHeader progress={100} />
45+
<ProgressHeader progress={66} />
5146
<main className='px-[2rem] py-[8rem]'>
5247
<h1 className='font-bold-18 text-main my-[0.8rem]'>포인팅</h1>
5348

@@ -71,8 +66,8 @@ const Page = () => {
7166
</ul>
7267

7368
<NavigationFooter
74-
prevLabel='한 걸음 더'
75-
nextLabel='리스트로'
69+
prevLabel='해설'
70+
nextLabel='한 걸음 더'
7671
onClickPrev={handleClickPrev}
7772
onClickNext={handleClickNext}
7873
/>

apps/service/src/components/common/Header.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client';
22
import { useRouter } from 'next/navigation';
33

4-
import { useTrackEvent } from '@hooks';
4+
import { trackEvent } from '@utils';
55
import { IcHome, IcLeft } from '@svg';
66

77
interface HeaderProps {
@@ -11,7 +11,6 @@ interface HeaderProps {
1111

1212
const Header = ({ title, iconType = 'home' }: HeaderProps) => {
1313
const router = useRouter();
14-
const { trackEvent } = useTrackEvent();
1514

1615
const handleClickHome = () => {
1716
trackEvent('header_home_button_click');

0 commit comments

Comments
 (0)