Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9449d26
feat(service): 이미지 클립보드 복사 기능 추가
gudusol Apr 17, 2025
6d557bb
feat(service): BottomSheet 컴포넌트 제작
gudusol Apr 19, 2025
e45f064
feat(service): BottomSheet 애니메이션 추가 및 일부 수정
gudusol Apr 19, 2025
a2f5cbf
feat(service): 메인 문제 채점 모달 -> 바텀시트 수정
gudusol Apr 19, 2025
c2f6b3d
chore(service): 안쓰는 Import 삭제
gudusol Apr 19, 2025
2be66be
feat(service): 토스트 메시지 스타일 수정
gudusol Apr 19, 2025
3a054d7
design(service): 복사하기 버튼으로 인한 이미지 상하 여백 조정
gudusol Apr 19, 2025
24ee860
feat(service): 썸네일 페이지 삭제(바로 메인문제 페이지로)
gudusol Apr 19, 2025
3bcf4f1
feat(service): 문제 풀이 플로우 변경에 따른 제출 생성 시점 수정
gudusol Apr 19, 2025
8e3eadc
feat(service): 문제 풀이 플로우 변경에 따른 새끼 문제 푸터 버튼 수정
gudusol Apr 19, 2025
3c9bdc7
design(service): 포인팅 버튼 수정
gudusol Apr 19, 2025
f230009
chore(service): 안쓰는 import 삭제
gudusol Apr 19, 2025
0194d84
design(service): 포인팅 상세 페이지 타이틀 수정
gudusol Apr 19, 2025
e64a55e
fix(service): 푼 문제 정답 표시되도록 수정
gudusol Apr 20, 2025
a613f6b
design(service): ProgressHeader 버튼 cursor: pointer로 수정
gudusol Apr 20, 2025
1322d83
fix(service): 문제 리스트 화면 카드 열림 상태 수정
gudusol Apr 20, 2025
052322f
design(service): OG 이미지 수정
gudusol Apr 23, 2025
2385a07
design(service): Updates the opengraph image (white -> blue)
gudusol Apr 23, 2025
bcf37df
feat(service): Updates the service description
gudusol Apr 23, 2025
59601c1
feat(service): DontKnowButton, StepSolveButton 컴포넌트 추가
gudusol Apr 23, 2025
c5faa66
fix(service): tailwind 자동완성 해결(@tailwindcss/postcss 설치)
gudusol Apr 23, 2025
050440c
feat(service): PointingImageContainer 컴포넌트 제작(포인팅/처방)
gudusol Apr 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
"react": "^19",
"react-dom": "^19",
"react-hook-form": "^7.54.2",
"react-toastify": "^11.0.3",
"swiper": "^11.2.5"
},
"devDependencies": {
"@svgr/webpack": "^8.1.0",
"@tailwindcss/postcss": "^4.0.4",
"@tanstack/eslint-plugin-query": "^5.66.0",
"@types/node": "^20",
"@types/react": "^19",
Expand Down
11 changes: 11 additions & 0 deletions apps/service/public/svg/ic-arrow-grow-14.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions apps/service/public/svg/ic-comment-check-20.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/service/public/svg/ic-next-gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/service/public/svg/ic-next-small.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions apps/service/public/svg/ic-prescription-20.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/service/public/svg/ic-question-18.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions apps/service/src/apis/controller/submit/postProblemSubmit.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { client } from '@apis';

const postProblemSubmit = async (publishId: string, problemId: string) => {
const postProblemSubmit = async (publishId: number, problemId: number) => {
return await client.POST('/api/v1/client/problemSubmit', {
body: {
publishId: Number(publishId),
problemId: Number(problemId),
publishId,
problemId,
},
});
};
Expand Down
2 changes: 1 addition & 1 deletion apps/service/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const metadata: Metadata = {
? new URL('http://www.dev.math-pointer.com')
: new URL('https://math-pointer.com'),
title: '포인터',
description: '포인터',
description: '진단과 학습은 꼼꼼하게 성적 향상은 빠르게',
robots: isDevelopment
? {
index: false,
Expand Down
Binary file modified apps/service/src/app/opengraph-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion apps/service/src/app/problem/list/[publishId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Page = () => {
<ProblemStatusCard
key={problem.problemId}
mainProblemNumber={index + 1}
publishId={publishId}
publishId={Number(publishId)}
problemData={problem}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const SolveButtonsClient = ({ publishId, problemId }: SolveButtonsClientProps) =

const handleClickDirect = async () => {
trackEvent('problem_solve_direct_button_click');
await postProblemSubmit(publishId, problemId);
await postProblemSubmit(Number(publishId), Number(problemId));
invalidateAll();
router.push(`/problem/solve/${publishId}/${problemId}/main-problem`);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { useState } from 'react';
import { useParams, useRouter } from 'next/navigation';
import { SubmitHandler, useForm } from 'react-hook-form';
import Image from 'next/image';
import { Slide, ToastContainer } from 'react-toastify';

import { copyImageToClipboard } from '@utils';
import { useGetChildProblemById } from '@apis';
import { putChildProblemSubmit, putChildProblemSkip } from '@apis';
import {
Expand All @@ -13,11 +15,13 @@ import {
NavigationFooter,
ProgressHeader,
SmallButton,
ChildAnswerCheckModalTemplate,
TwoButtonModalTemplate,
AnswerModalTemplate,
Tag,
ImageContainer,
CopyButton,
BottomSheet,
ChildAnswerCheckBottomSheetTemplate,
} from '@components';
import { useInvalidate, useModal } from '@hooks';
import { components } from '@schema';
Expand Down Expand Up @@ -64,9 +68,7 @@ const Page = () => {
} = data?.data ?? {};

const prevButtonLabel =
childProblemNumber === 1
? `메인 문제 ${problemNumber}번`
: `새끼 문제 ${problemNumber}-${childProblemNumber - 1}번`;
childProblemNumber === 1 ? '' : `새끼 문제 ${problemNumber}-${childProblemNumber - 1}번`;

const nextButtonLabel =
childProblemNumber === childProblemLength
Expand Down Expand Up @@ -140,12 +142,35 @@ const Page = () => {
onNext();
};

const handleClickCopyImage = async () => {
if (!imageUrl) return;
await copyImageToClipboard(imageUrl);
};

if (isLoading) {
return <></>;
}

return (
<>
<ToastContainer
position='bottom-center'
autoClose={1000}
newestOnTop={true}
closeOnClick
rtl={false}
pauseOnHover={false}
hideProgressBar
transition={Slide}
closeButton={false}
style={{
fontSize: '1.6rem',
width: '30rem',
left: '50%',
transform: 'translateX(-50%)',
bottom: '3rem',
}}
/>
<ProgressHeader progress={(childProblemNumber / (childProblemLength + 1)) * 100} />
<main className='flex flex-col px-[2rem] py-[8rem]'>
<div className='w-full'>
Expand All @@ -164,14 +189,18 @@ const Page = () => {
</Tag>
)}
</div>
<ImageContainer className='mt-[1.2rem]'>
<ImageContainer className='relative mt-[1.2rem]'>
<Image
src={imageUrl ?? ''}
alt={`새끼 문제 ${problemNumber}-${childProblemNumber}번`}
className='w-full object-contain'
width={700}
height={200}
priority
/>
<div className='absolute right-[1.6rem] bottom-[1.6rem]'>
<CopyButton onClick={handleClickCopyImage} />
</div>
</ImageContainer>

<div className='mt-[0.6rem] mb-[0.4rem] flex items-center justify-end'>
Expand Down Expand Up @@ -204,14 +233,16 @@ const Page = () => {
onClickNext={isSubmitted ? handleClickNext : handleClickFooterSkipButton}
/>

<PortalModal isOpen={isOpen} onClose={closeModal}>
<ChildAnswerCheckModalTemplate
<BottomSheet isOpen={isOpen} onClose={closeModal}>
<ChildAnswerCheckBottomSheetTemplate
result={result}
onClose={handleClickCloseCheckModal}
handleClickButton={handleClickNextProblemButton}
handleClickShowPointing={() => {}}
handleClickNext={handleClickNextProblemButton}
handleClickShowAnswer={handleClickShowAnswer}
/>
</PortalModal>
</BottomSheet>

<PortalModal isOpen={isAnswerModalOpen} onClose={closeAnswerModal}>
<AnswerModalTemplate
answer={`${result?.answer}${answerType === 'MULTIPLE_CHOICE' ? '번' : ''}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,26 @@ import { useState } from 'react';
import { useParams, useRouter } from 'next/navigation';
import { SubmitHandler, useForm } from 'react-hook-form';
import Image from 'next/image';
import { Slide, ToastContainer } from 'react-toastify';

import { useGetProblemById, putProblemSubmit } from '@apis';
import {
AnswerInput,
Button,
MainAnswerCheckModalTemplate,
PortalModal,
Tag,
ProgressHeader,
SmallButton,
NavigationFooter,
TimeTag,
ImageContainer,
CopyButton,
MainAnswerCheckBottomSheetTemplate,
BottomSheet,
} from '@components';
import { useInvalidate, useModal } from '@hooks';
import { ProblemStatus } from '@types';
import { useChildProblemContext } from '@/hooks/problem';
import { trackEvent } from '@utils';
import { copyImageToClipboard, trackEvent } from '@utils';

const statusLabel: Record<string, string> = {
CORRECT: '정답',
Expand Down Expand Up @@ -111,12 +113,35 @@ const Page = () => {
router.push(`/report/${publishId}/${problemId}/analysis`);
};

const handleClickCopyImage = async () => {
if (!imageUrl) return;
await copyImageToClipboard(imageUrl);
};

if (isLoading) {
return <></>;
}

return (
<>
<ToastContainer
position='bottom-center'
autoClose={1000}
newestOnTop={true}
closeOnClick
rtl={false}
pauseOnHover={false}
hideProgressBar
transition={Slide}
closeButton={false}
style={{
fontSize: '1.6rem',
width: '30rem',
left: '50%',
transform: 'translateX(-50%)',
bottom: '3rem',
}}
/>
<ProgressHeader progress={100} />
<main className='flex flex-col px-[2rem] py-[8rem]'>
<div className='w-full'>
Expand All @@ -136,7 +161,7 @@ const Page = () => {
</Tag>
)}
</div>
<ImageContainer className='mt-[1.2rem]'>
<ImageContainer className='relative mt-[1.2rem]'>
<Image
src={imageUrl ?? ''}
alt={`메인 문제 ${number}번`}
Expand All @@ -145,6 +170,9 @@ const Page = () => {
height={200}
priority
/>
<div className='absolute right-[1.6rem] bottom-[1.6rem]'>
<CopyButton onClick={handleClickCopyImage} />
</div>
</ImageContainer>

{isDirect && (
Expand Down Expand Up @@ -197,13 +225,14 @@ const Page = () => {
onClickNext={isSubmitted ? handleClickNext : undefined}
/>

<PortalModal isOpen={isOpen} onClose={closeModal}>
<MainAnswerCheckModalTemplate
<BottomSheet isOpen={isOpen} onClose={closeModal}>
<MainAnswerCheckBottomSheetTemplate
result={result}
onClose={handleClickSolveAgain}
handleClickButton={handleClickShowReport}
handleClickStepSolve={handleClickStepSolve}
handleClickShowReport={handleClickShowReport}
/>
</PortalModal>
</BottomSheet>
</>
);
};
Expand Down
Loading