Skip to content
Merged
Changes from all commits
Commits
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: 1 addition & 1 deletion apps/landing/src/components/FinalCTASection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const FinalCTASection = () => {
<Button
variant="primary"
onClick={() => {
window.location.href = 'https://pinback.today';
window.location.href = 'https://pinback.today/onboarding';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

🧩 Analysis chain

URL 변경 영향도 점검 요청

온보딩 경로 접근 조건(로그인/리다이렉션), 분석 이벤트 트래킹, 다른 하드코딩 URL 유무를 확인 부탁드립니다.


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) 레포 내 하드코딩된 prod 도메인 사용처
rg -nP --no-ignore-vcs 'https?://pinback\.today' -C2

# 2) 온보딩 관련 경로 전반 사용처
rg -nP --no-ignore-vcs '\bonboarding\b' -C2

# 3) window.location 직접 사용 패턴 점검 (리로드 유발)
rg -nP --type=ts --type=tsx -C2 '\bwindow\.location\.(href|assign|replace)\b'

# 4) Button의 asChild 사용 사례 유무(디자인시스템 지원 여부 가늠)
rg -nP --type=ts --type=tsx -C2 '\<Button\b[^>]*\basChild\b'

Length of output: 5455


하드코딩된 프로덕션 도메인·온보딩 경로 영향 검토 — 수정 필요

레포에서 절대 도메인(https://pinback.today / https://www.pinback.today)과 온보딩 경로 사용처가 확인되었습니다. 도메인 변경 시 동작 불일치 및 확장(extension) 동작 중단 가능.

  • apps/landing/src/components/FinalCTASection.tsx:25 — window.location.href = 'https://pinback.today/onboarding';
  • apps/extension/src/pages/MainPop.tsx:238 — Icon onClick -> 'https://pinback.today'
  • apps/extension/src/App.tsx:27 — window.location.href = "https://pinback.today/";
  • apps/extension/src/background.ts:10 — chrome.tabs.create url https://www.pinback.today/onboarding?email=${info.email} (www 포함)
  • apps/client/src/shared/apis/setting/axiosInstance.ts:83,89 — window.location.href = '/onboarding' (토큰 관련 리다이렉트)
  • apps/client/src/layout/Layout.tsx:6 — location.pathname.startsWith('/onboarding')
  • onboarding 관련 컴포넌트 다수(예: apps/client/src/pages/onBoarding/.../StoryStep.tsx)

조치 체크리스트:

  • 도메인(www 포함 여부) 하드코딩을 환경변수/상수로 추출.
  • extension 코드의 절대 URL 우선 수정(배포 전 반영 필수).
  • window.location 직접 사용으로 인한 전체 리로드/상태 손실 여부 확인 → 가능하면 내부 라우터로 대체.
  • 토큰 만료 시 리다이렉트(axiosInstance)와 온보딩 접근권한(비로그인 허용 여부) 재검증.
  • 온보딩 관련 분석/이벤트 트래킹 위치(analytics 호출) 확인.
🤖 Prompt for AI Agents
In apps/landing/src/components/FinalCTASection.tsx around line 25, the code
hardcodes the production onboarding URL (window.location.href =
'https://pinback.today/onboarding'); replace this by reading a single shared
base URL constant or environment variable (e.g.,
process.env.NEXT_PUBLIC_BASE_URL or a central config) and compose the onboarding
path from it; prefer using the app's router/navigation method instead of
window.location to avoid full reload and state loss; also audit and update the
extension code to use the same base URL constant (ensuring consistent www vs
non-www handling), and re-check axiosInstance token-expiry redirect logic and
onboarding route guards to ensure internal routing and analytics/tracking
behavior remain correct after the change.

}}
>
지금 시작하기
Expand Down
Loading