-
Notifications
You must be signed in to change notification settings - Fork 1
Feat(landing): url 변경 #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughLanding 페이지의 두 컴포넌트에서 버튼 클릭 시 이동 경로를 크롬 웹 스토어 확장 프로그램 상세 페이지로 변경했습니다. FinalCTASection의 기본 버튼과 Header의 “다운로드” 버튼에 onClick 핸들러를 추가/수정하여 window.location.href 기반 리다이렉트를 수행합니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant H as Header/FinalCTA Button
participant B as Browser
participant CWS as Chrome Web Store
U->>H: Click "다운로드"/Primary CTA
H->>B: window.location.href = CWS URL
B->>CWS: Navigate (GET)
CWS-->>U: Extension detail page
note over H,B: 신규/수정된 리다이렉트 동작
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Storybook chromatic 배포 확인: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
apps/landing/src/components/FinalCTASection.tsx(1 hunks)apps/landing/src/components/Header.tsx(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: storybook
| onClick={() => { | ||
| window.location.href = 'https://www.pinback.today/onboarding'; | ||
| window.location.href = | ||
| 'https://chromewebstore.google.com/detail/pinback-extension/engpidnjjbemfjmpcplchpfhokkgnbec?hl=ko&utm_source=ext_sidebar'; | ||
| }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
외부 링크는 새 탭에서 열도록 개선 필요
현재 window.location.href를 사용하면 랜딩 페이지를 완전히 떠나게 되어 사용자 경험이 저하됩니다. 크롬 웹 스토어 링크는 새 탭에서 열어 사용자가 랜딩 페이지를 유지할 수 있도록 하는 것이 표준적인 방법입니다.
또한 동일한 URL이 Header.tsx(Line 11-12)에도 하드코딩되어 있어 코드 중복이 발생합니다. URL을 상수로 추출하여 관리하는 것을 권장합니다.
제안하는 리팩토링:
- URL을 상수로 추출 (예:
src/constants/urls.ts):
export const CHROME_STORE_URL = 'https://chromewebstore.google.com/detail/pinback-extension/engpidnjjbemfjmpcplchpfhokkgnbec?hl=ko&utm_source=ext_sidebar';- 새 탭에서 링크 열기:
+import { CHROME_STORE_URL } from '../constants/urls';
+
const FinalCTASection = () => {
return (
<section className="...">
...
<Button
variant="primary"
onClick={() => {
- window.location.href =
- 'https://chromewebstore.google.com/detail/pinback-extension/engpidnjjbemfjmpcplchpfhokkgnbec?hl=ko&utm_source=ext_sidebar';
+ window.open(CHROME_STORE_URL, '_blank', 'noopener,noreferrer');
}}
>
지금 시작하기🤖 Prompt for AI Agents
In apps/landing/src/components/FinalCTASection.tsx around lines 24-27, the
onClick currently assigns window.location.href which navigates away from the
landing page and duplicates a hardcoded Chrome Web Store URL also present in
Header.tsx (lines 11-12); extract the URL into a new constant file (e.g.,
src/constants/urls.ts exporting CHROME_STORE_URL), import that constant into
both FinalCTASection.tsx and Header.tsx, and change the click behavior to open
the URL in a new tab using window.open with appropriate rel flags
(noopener,noreferrer) or by rendering an <a> with target="_blank" rel="noopener
noreferrer" to preserve UX and security.
| <Button | ||
| onClick={() => { | ||
| window.location.href = | ||
| 'https://chromewebstore.google.com/detail/pinback-extension/engpidnjjbemfjmpcplchpfhokkgnbec?hl=ko&utm_source=ext_sidebar'; | ||
| }} | ||
| > | ||
| 다운로드 | ||
| </Button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
외부 링크는 새 탭에서 열도록 개선 필요
FinalCTASection.tsx와 동일한 이슈가 있습니다:
window.location.href사용으로 랜딩 페이지를 완전히 떠나게 되어 UX 저하- URL이 하드코딩되어 있어 FinalCTASection.tsx(Line 25-26)와 코드 중복
제안하는 리팩토링:
URL 상수를 추출하고 새 탭에서 열기:
+import { CHROME_STORE_URL } from '../constants/urls';
+
const Header = () => {
return (
<header className="...">
<Icon name={'logo'} width={87} height={24} />
<div>
<Button
onClick={() => {
- window.location.href =
- 'https://chromewebstore.google.com/detail/pinback-extension/engpidnjjbemfjmpcplchpfhokkgnbec?hl=ko&utm_source=ext_sidebar';
+ window.open(CHROME_STORE_URL, '_blank', 'noopener,noreferrer');
}}
>
다운로드
📌 Related Issues
📄 Tasks
⭐ PR Point (To Reviewer)
📷 Screenshot
Summary by CodeRabbit