From 3c36cc205717ea8eadbf94e6688436046fb46d81 Mon Sep 17 00:00:00 2001 From: TwoMuchSilver Date: Tue, 16 Dec 2025 17:30:06 +0900 Subject: [PATCH 01/10] =?UTF-8?q?feat:=20=EC=B6=94=EA=B0=80=20=EB=94=94?= =?UTF-8?q?=EB=B2=84=EA=B9=85=20=EC=A0=95=EB=B3=B4=20=EB=B0=8F=20=EC=9A=94?= =?UTF-8?q?=EC=B2=AD/=EC=9D=91=EB=8B=B5=20=EC=83=81=ED=83=9C=20=ED=99=95?= =?UTF-8?q?=EC=9D=B8=20=EB=A1=9C=EC=A7=81=20=EC=A3=BC=EC=84=9D=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/domain/auth/useLogin.ts | 10 ++++++++ src/services/tossAuth.ts | 38 ++++++++++++++++++++++++++----- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/src/hooks/domain/auth/useLogin.ts b/src/hooks/domain/auth/useLogin.ts index fb1c95d..2b3dbca 100644 --- a/src/hooks/domain/auth/useLogin.ts +++ b/src/hooks/domain/auth/useLogin.ts @@ -26,6 +26,15 @@ export const useLogin = () => { : '로그인에 실패했습니다. 다시 시도해주세요.'; alert(errorMessage); + + // [디버깅] 상세 에러 정보 + // if (error instanceof Error) { + // alert(`[에러]\n${error.message}\n\n[Stack]\n${error.stack?.slice(0, 200) || 'No stack'}`); + // } else if (typeof error === 'object' && error !== null) { + // alert(`[에러 객체]\n${JSON.stringify(error, null, 2)}`); + // } else { + // alert(`[알 수 없는 에러]\n${String(error)}`); + // } } finally { setIsLoading(false); } @@ -34,3 +43,4 @@ export const useLogin = () => { return { handleLogin, isLoading }; }; + diff --git a/src/services/tossAuth.ts b/src/services/tossAuth.ts index 6c01862..bd326cb 100644 --- a/src/services/tossAuth.ts +++ b/src/services/tossAuth.ts @@ -76,18 +76,27 @@ export async function loginToBackend( // Response 헤더를 확인하기 위해 fetch를 직접 사용 // apiRequest는 헤더 접근이 제한되므로 여기서는 fetch 직접 사용 유지 const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || '/dayline/api'; - const response = await fetch(`${API_BASE_URL}/v1/auth/toss/login`, { + const fullUrl = `${API_BASE_URL}/v1/auth/toss/login`; + + // [디버깅] 요청 정보 확인 + // alert(`[백엔드 요청 시작]\nURL: ${fullUrl}\nMethod: POST\nReferrer: ${referrer}`); + + const response = await fetch(fullUrl, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(requestBody), }); + + // [디버깅] 응답 상태 확인 + // alert(`[백엔드 응답]\nStatus: ${response.status}\nStatusText: ${response.statusText}\nOK: ${response.ok}`); if (!response.ok) { const errorText = await response.text(); - // [DEBUG] 백엔드 에러 내용 확인 (테스트 후 삭제 필요) - // alert(`[Step 2 실패] 백엔드 응답 에러 (${response.status})\n${errorText.slice(0, 100)}`); + + // [디버깅] 백엔드 에러 내용 확인 + // alert(`[백엔드 에러]\nStatus: ${response.status}\nError: ${errorText.slice(0, 200)}`); let message = '로그인에 실패했습니다.'; try { @@ -147,6 +156,14 @@ export async function loginToBackend( } catch (error) { console.error('[Step 2] 로그인 API 요청 실패:', error); + + // [디버깅] Fetch 에러 상세 정보 + // if (error instanceof TypeError) { + // alert(`[Fetch 에러]\nTypeError: ${error.message}\n\n네트워크 연결 실패 또는 CORS 문제일 수 있습니다.`); + // } else if (error instanceof Error) { + // alert(`[에러 상세]\nName: ${error.name}\nMessage: ${error.message}`); + // } + throw error; } } @@ -159,22 +176,31 @@ export async function loginWithToss() { try { // 1. 인가 코드 획득 + // alert('[Step 1] 인가 코드 받기 시작...'); const { authorizationCode, referrer } = await getTossAuthorizationCode(); - // [DEBUG] 모바일 디버깅용 알림 (테스트 후 삭제 필요) - // alert(`[Step 1 성공] 인가코드 획득\nCode: ${authorizationCode.slice(0, 10)}...\nReferrer: ${referrer}`); + // [디버깅] 인가 코드 획득 성공 + // alert(`[Step 1 성공]\nCode: ${authorizationCode.slice(0, 20)}...\nReferrer: ${referrer}`); // 2. 백엔드 로그인 + // alert('[Step 2] 백엔드 로그인 시작...'); const userKey = await loginToBackend(authorizationCode, referrer); // 3. UserKey 저장 saveUserKey(userKey); console.log('UserKey 저장 완료:', userKey); + // alert(`[로그인 성공!]\nUserKey: ${userKey}`); console.log('로그인 완료!'); return userKey; } catch (error) { - console.error('로로그인 프로세스 중단:', error); + console.error('로그인 프로세스 중단:', error); + + // [디버깅] 로그인 플로우 실패 + // if (error instanceof Error) { + // alert(`[로그인 플로우 실패]\n${error.message}`); + // } + throw error; } } From d85032bc12e93d2c274718e9ecd29cc0ebec43f9 Mon Sep 17 00:00:00 2001 From: TwoMuchSilver Date: Wed, 17 Dec 2025 13:02:07 +0900 Subject: [PATCH 02/10] =?UTF-8?q?fix:=20'=ED=95=98=EB=A3=A8'=ED=85=8D?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20'=EC=98=A4=EB=8A=98'=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20=EB=B0=8F=20=EB=A1=9C=EA=B3=A0=20=EA=B2=BD=EB=A1=9C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- granite.config.ts | 4 ++-- index.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d83e5f9..d49ab05 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -### 하루 한 줄 (앱인토스) \ No newline at end of file +### 오늘 한 줄 (앱인토스) \ No newline at end of file diff --git a/granite.config.ts b/granite.config.ts index bf4996b..072039f 100644 --- a/granite.config.ts +++ b/granite.config.ts @@ -3,9 +3,9 @@ import { defineConfig } from '@apps-in-toss/web-framework/config'; export default defineConfig({ appName: 'wq-dayline', brand: { - displayName: '하루 한 줄', // 화면에 노출될 앱의 한글 이름으로 바꿔주세요. + displayName: '오늘 한 줄', // 화면에 노출될 앱의 한글 이름으로 바꿔주세요. primaryColor: '#3182F6', // 화면에 노출될 앱의 기본 색상으로 바꿔주세요. - icon: 'src/assets/dayline_light_logo.png', // 화면에 노출될 앱의 아이콘 이미지 주소로 바꿔주세요. + icon: 'https://static.toss.im/appsintoss/8211/1dafb690-4251-4735-bfe6-a9a663ba860e.png', // 화면에 노출될 앱의 아이콘 이미지 주소로 바꿔주세요. bridgeColorMode: 'basic', }, web: { diff --git a/index.html b/index.html index 110d2a7..d3ce03b 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + dayline From 866ca1af6c3a7140fb04a89412d98b9cea3deb5e Mon Sep 17 00:00:00 2001 From: TwoMuchSilver Date: Wed, 17 Dec 2025 13:03:19 +0900 Subject: [PATCH 03/10] =?UTF-8?q?fix:=20=EA=B8=B0=EC=A1=B4=20=EC=BB=A4?= =?UTF-8?q?=EC=8A=A4=ED=85=80=20Badge=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20TDS=20Badge=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8?= =?UTF-8?q?=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/stats/StatsDetailView.tsx | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/components/stats/StatsDetailView.tsx b/src/components/stats/StatsDetailView.tsx index c1f0c2e..7771dfb 100644 --- a/src/components/stats/StatsDetailView.tsx +++ b/src/components/stats/StatsDetailView.tsx @@ -1,5 +1,5 @@ -import { ListHeader, Text } from '@toss/tds-mobile'; -import { adaptive, colors } from '@toss/tds-colors'; +import { ListHeader, Text, Badge } from '@toss/tds-mobile'; +import { adaptive } from '@toss/tds-colors'; import type { DiaryEntry } from '../../types/diary'; interface StatsDetailViewProps { @@ -31,7 +31,7 @@ export const StatsDetailView = ({ entry, selectedDate }: StatsDetailViewProps) = {formattedDate} 한 줄 @@ -41,18 +41,9 @@ export const StatsDetailView = ({ entry, selectedDate }: StatsDetailViewProps) = />
- {/* Badge 컴포넌트가 예상대로 렌더링되지 않는 경우를 대비한 스타일 오버라이드 */} -
- - + {entry.score} - -
+ + + {entry.score} +
Date: Wed, 17 Dec 2025 13:03:49 +0900 Subject: [PATCH 04/10] =?UTF-8?q?feat:=20=EC=8B=A4=EC=A0=9C=20=EA=B4=91?= =?UTF-8?q?=EA=B3=A0=20=EA=B7=B8=EB=A3=B9=20ID=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/domain/diary/useDiarySubmit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/domain/diary/useDiarySubmit.ts b/src/hooks/domain/diary/useDiarySubmit.ts index 364ce06..5e11d35 100644 --- a/src/hooks/domain/diary/useDiarySubmit.ts +++ b/src/hooks/domain/diary/useDiarySubmit.ts @@ -20,7 +20,7 @@ export const useDiarySubmit = ({ trimmedValue, hasTodayDiary }: UseDiarySubmitPr // 광고 훅 사용 const { showAd } = useAdMob({ - adGroupId: 'ait-ad-test-interstitial-id', + adGroupId: 'ait.v2.live.8be900a4b263458c', shouldLoad: !hasTodayDiary // 이미 작성했다면 광고 로드 안 함 }); From 67f15a11fca84a61ddcedca14574b4cdf6bfd737 Mon Sep 17 00:00:00 2001 From: TwoMuchSilver Date: Wed, 17 Dec 2025 13:04:35 +0900 Subject: [PATCH 05/10] =?UTF-8?q?fix:=20=EC=95=B1=20=EC=9D=B4=EB=A6=84=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EB=B0=8F=20=EB=A7=88=EC=A7=80=EB=A7=89=20?= =?UTF-8?q?StepperRow=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20HideLine=20?= =?UTF-8?q?=EC=86=8D=EC=84=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/IntroPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/IntroPage.tsx b/src/pages/IntroPage.tsx index a91f192..5f2109b 100644 --- a/src/pages/IntroPage.tsx +++ b/src/pages/IntroPage.tsx @@ -15,7 +15,7 @@ export default function Page() {
- 하루 한 줄로 감정을 돌아보세요 + 오늘 한 줄로 감정을 돌아보세요
@@ -71,7 +71,7 @@ export default function Page() { />
} - hideLine={false} + hideLine={true} />
From 24da8d6e40c81c5ba0f05eb5d1353b02cd3faf78 Mon Sep 17 00:00:00 2001 From: TwoMuchSilver Date: Wed, 17 Dec 2025 13:04:59 +0900 Subject: [PATCH 06/10] =?UTF-8?q?fix:=20=ED=83=AD=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=20=ED=95=98=EB=8B=A8=20=EA=B5=AC=EB=B6=84?= =?UTF-8?q?=EC=84=A0=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/StatsPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/StatsPage.tsx b/src/pages/StatsPage.tsx index 831a6b6..dbcd4c4 100644 --- a/src/pages/StatsPage.tsx +++ b/src/pages/StatsPage.tsx @@ -119,12 +119,12 @@ export default function Page() { {/* 탭 하단 구분선 - 스타일 명확화 */} -
+ }} /> */}
Date: Wed, 17 Dec 2025 13:07:42 +0900 Subject: [PATCH 07/10] =?UTF-8?q?fix:=20=ED=95=84=EC=9A=94=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/vite.svg | 1 - src/assets/react.svg | 1 - 2 files changed, 2 deletions(-) delete mode 100644 public/vite.svg delete mode 100644 src/assets/react.svg diff --git a/public/vite.svg b/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/react.svg b/src/assets/react.svg deleted file mode 100644 index 6c87de9..0000000 --- a/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From f6ac7e1de2be927ba54efc406967e9b3af4e10ee Mon Sep 17 00:00:00 2001 From: TwoMuchSilver Date: Wed, 17 Dec 2025 14:13:12 +0900 Subject: [PATCH 08/10] =?UTF-8?q?ci:=20main=20=EB=B8=8C=EB=9E=9C=EC=B9=98?= =?UTF-8?q?=20merge=20=EC=8B=9C=20AIT=20=EC=9E=90=EB=8F=99=20=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=20=EC=84=A4=EC=A0=95=20-=20GitHub=20Actions=EB=A5=BC?= =?UTF-8?q?=20=ED=86=B5=ED=95=9C=20=EC=9E=90=EB=8F=99=20=EB=B9=8C=EB=93=9C?= =?UTF-8?q?=20=EB=B0=8F=20=EB=B0=B0=ED=8F=AC=20-=20main=20=EB=B8=8C?= =?UTF-8?q?=EB=9E=9C=EC=B9=98=20push=20=EC=8B=9C=20=EC=9E=90=EB=8F=99=20?= =?UTF-8?q?=EC=8B=A4=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 35 +++++++++++++++++++++++++++++++++++ .gitignore | 3 +++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..f30c239 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,35 @@ +name: Deploy to AIT + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build project + run: npm run build:prod + + - name: Setup AIT token + run: | + npx ait token add --token ${{ secrets.AIT_TOKEN }} + env: + AIT_TOKEN: ${{ secrets.AIT_TOKEN }} + + - name: Deploy to AIT + run: npm run deploy diff --git a/.gitignore b/.gitignore index 2b3bcd4..2a505d6 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,7 @@ dist-ssr *.sw? .env +.env.development +.env.production +.env.remote .granite From 963496822d8a3e79385f9c27fa0f6ca5f2fb4619 Mon Sep 17 00:00:00 2001 From: TwoMuchSilver Date: Wed, 17 Dec 2025 14:19:15 +0900 Subject: [PATCH 09/10] Fix AIT token command in deploy workflow --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f30c239..f0734d5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,7 +27,7 @@ jobs: - name: Setup AIT token run: | - npx ait token add --token ${{ secrets.AIT_TOKEN }} + npx ait token add :wq ${{ secrets.AIT_TOKEN }} env: AIT_TOKEN: ${{ secrets.AIT_TOKEN }} From fdab36b6606b381eb5f6a3cf2c8e754893d8731e Mon Sep 17 00:00:00 2001 From: TwoMuchSilver Date: Wed, 17 Dec 2025 14:21:27 +0900 Subject: [PATCH 10/10] Fix AIT token setup command in deploy workflow --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f0734d5..8303086 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,7 +27,7 @@ jobs: - name: Setup AIT token run: | - npx ait token add :wq ${{ secrets.AIT_TOKEN }} + npx ait token add ${{ secrets.AIT_TOKEN }} env: AIT_TOKEN: ${{ secrets.AIT_TOKEN }}