diff --git a/apps/service/next.config.ts b/apps/service/next.config.ts index 3686b004..5c3e5b74 100644 --- a/apps/service/next.config.ts +++ b/apps/service/next.config.ts @@ -1,6 +1,10 @@ import type { NextConfig } from 'next'; const nextConfig: NextConfig = { + images: { + domains: ['s3-moplus.s3.ap-northeast-2.amazonaws.com'], + }, + webpack(config) { config.module.rules.push({ test: /\.svg$/i, diff --git a/apps/service/src/app/@modal/(.)image-modal/page.tsx b/apps/service/src/app/@modal/(.)image-modal/page.tsx index 7dfcb836..ef8cf4d2 100644 --- a/apps/service/src/app/@modal/(.)image-modal/page.tsx +++ b/apps/service/src/app/@modal/(.)image-modal/page.tsx @@ -1,5 +1,6 @@ 'use client'; import { RouteModal } from '@components'; +import Image from 'next/image'; import { useSearchParams } from 'next/navigation'; const page = () => { @@ -8,8 +9,14 @@ const page = () => { return ( -
- full image +
+ full image
); diff --git a/apps/service/src/app/problem/solve/[publishId]/[problemId]/child-problem/[childProblemId]/page.tsx b/apps/service/src/app/problem/solve/[publishId]/[problemId]/child-problem/[childProblemId]/page.tsx index 33315c6b..35fa37b8 100644 --- a/apps/service/src/app/problem/solve/[publishId]/[problemId]/child-problem/[childProblemId]/page.tsx +++ b/apps/service/src/app/problem/solve/[publishId]/[problemId]/child-problem/[childProblemId]/page.tsx @@ -15,9 +15,11 @@ import { TwoButtonModalTemplate, AnswerModalTemplate, Tag, + ImageContainer, } from '@components'; import { useInvalidate, useModal, useTrackEvent } from '@hooks'; import { components } from '@schema'; +import Image from 'next/image'; import { useChildProblemContext } from '@/hooks/problem'; @@ -51,7 +53,7 @@ const Page = () => { const selectedAnswer = watch('answer'); // apis - const { data } = getChildProblemById(publishId, problemId, childProblemId); + const { data, isLoading } = getChildProblemById(publishId, problemId, childProblemId); const { problemNumber, childProblemNumber = 1, @@ -138,6 +140,10 @@ const Page = () => { onNext(); }; + if (isLoading) { + return <>; + } + return ( <> @@ -158,11 +164,15 @@ const Page = () => { )}
- {`새끼 + + {`새끼 +
diff --git a/apps/service/src/app/problem/solve/[publishId]/[problemId]/main-problem/page.tsx b/apps/service/src/app/problem/solve/[publishId]/[problemId]/main-problem/page.tsx index c954a5ce..b23eeec8 100644 --- a/apps/service/src/app/problem/solve/[publishId]/[problemId]/main-problem/page.tsx +++ b/apps/service/src/app/problem/solve/[publishId]/[problemId]/main-problem/page.tsx @@ -13,9 +13,11 @@ import { SmallButton, NavigationFooter, TimeTag, + ImageContainer, } from '@components'; import { useInvalidate, useModal, useTrackEvent } from '@hooks'; import { ProblemStatus } from '@types'; +import Image from 'next/image'; import { useChildProblemContext } from '@/hooks/problem'; @@ -46,7 +48,7 @@ const Page = () => { const selectedAnswer = watch('answer'); // apis - const { data } = getProblemById(publishId, problemId); + const { data, isLoading } = getProblemById(publishId, problemId); const { number, @@ -109,6 +111,10 @@ const Page = () => { router.push(`/report/${publishId}/${problemId}/analysis`); }; + if (isLoading) { + return <>; + } + return ( <> @@ -130,11 +136,16 @@ const Page = () => { )}
- {`메인 + + {`메인 + {isDirect && (
diff --git a/apps/service/src/app/problem/solve/[publishId]/[problemId]/page.tsx b/apps/service/src/app/problem/solve/[publishId]/[problemId]/page.tsx index 62ef1485..1b84730c 100644 --- a/apps/service/src/app/problem/solve/[publishId]/[problemId]/page.tsx +++ b/apps/service/src/app/problem/solve/[publishId]/[problemId]/page.tsx @@ -1,16 +1,22 @@ 'use client'; + import { getProblemThumbnail } from '@apis'; -import { ProgressHeader, TimeTag } from '@components'; +import { ImageContainer, ProgressHeader, TimeTag } from '@components'; import { useParams } from 'next/navigation'; +import Image from 'next/image'; import SolveButtonsClient from './SolveButtonsClient'; const Page = () => { const { publishId, problemId } = useParams<{ publishId: string; problemId: string }>(); - const { data } = getProblemThumbnail(publishId, problemId); + const { data, isLoading } = getProblemThumbnail(publishId, problemId); const { number, imageUrl, recommendedMinute, recommendedSecond } = data?.data ?? {}; + if (isLoading) { + return <>; + } + return ( <> @@ -19,11 +25,16 @@ const Page = () => {

메인 문제 {number}번

- {`메인 + + {`메인 + diff --git a/apps/service/src/app/report/[publishId]/[problemId]/advanced/page.tsx b/apps/service/src/app/report/[publishId]/[problemId]/advanced/page.tsx index a9b68e91..4673fb00 100644 --- a/apps/service/src/app/report/[publishId]/[problemId]/advanced/page.tsx +++ b/apps/service/src/app/report/[publishId]/[problemId]/advanced/page.tsx @@ -1,7 +1,8 @@ 'use client'; -import { NavigationFooter, SmallButton, ProgressHeader } from '@components'; +import { NavigationFooter, SmallButton, ProgressHeader, ImageContainer } from '@components'; import { useParams, useRouter } from 'next/navigation'; import { useTrackEvent } from '@hooks'; +import Image from 'next/image'; import { useReportContext } from '@/hooks/report'; @@ -33,6 +34,10 @@ const Page = () => { router.push(`/report/${publishId}/${problemId}/prescription`); }; + if (!seniorTipImageUrl) { + return <>; + } + return ( <> @@ -44,11 +49,16 @@ const Page = () => {
- advanced + + advanced +
{ router.push(`/report/${publishId}/${problemId}/advanced`); }; + if (!mainAnalysisImageUrl || !mainHandwritingExplanationImageUrl) { + return <>; + } + return ( <> @@ -61,16 +66,26 @@ const Page = () => { selectedTab={selectedTab} onTabChange={handleClickTab} /> - analysis - handWriting + + analysis + + + handWriting +