-
Notifications
You must be signed in to change notification settings - Fork 0
[Hotfix] 서버 에러 알림 모달 제거 #194
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,14 +5,13 @@ import * as styles from './page.css'; | |||||||||||||||||||||||||||||||||||||||
| import InsteadLogoImage from '@web/assets/images/instead.svg'; | ||||||||||||||||||||||||||||||||||||||||
| import { Spacing } from '@repo/ui/Spacing'; | ||||||||||||||||||||||||||||||||||||||||
| import JoinImage from '@web/assets/images/join.png'; | ||||||||||||||||||||||||||||||||||||||||
| import { useToast, useModal } from '@repo/ui/hooks'; | ||||||||||||||||||||||||||||||||||||||||
| import { useToast } from '@repo/ui/hooks'; | ||||||||||||||||||||||||||||||||||||||||
| import { useEffect } from 'react'; | ||||||||||||||||||||||||||||||||||||||||
| import { Text } from '@repo/ui/Text'; | ||||||||||||||||||||||||||||||||||||||||
| import { GoogleLoginButton } from './_components/GoogleLoginButton/GoogleLoginButton'; | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| export default function JoinPage() { | ||||||||||||||||||||||||||||||||||||||||
| const toast = useToast(); | ||||||||||||||||||||||||||||||||||||||||
| const modal = useModal(); | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| useEffect(() => { | ||||||||||||||||||||||||||||||||||||||||
| const params = new URLSearchParams(window.location.search); | ||||||||||||||||||||||||||||||||||||||||
|
|
@@ -22,15 +21,9 @@ export default function JoinPage() { | |||||||||||||||||||||||||||||||||||||||
| }, [toast]); | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| const handleGoogleLogin = async () => { | ||||||||||||||||||||||||||||||||||||||||
| //window.location.href = process.env.NEXT_PUBLIC_GOOGLE_AUTH_URL ?? ''; | ||||||||||||||||||||||||||||||||||||||||
| modal.alert({ | ||||||||||||||||||||||||||||||||||||||||
| title: '서버 점검 중', | ||||||||||||||||||||||||||||||||||||||||
| description: | ||||||||||||||||||||||||||||||||||||||||
| '5/30(금) 오전 1시에 완료될 예정이에요\n이용에 불편을 드려 죄송해요', | ||||||||||||||||||||||||||||||||||||||||
| alertButton: '확인', | ||||||||||||||||||||||||||||||||||||||||
| isCloseOnDimmerClick: false, | ||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||
| window.location.href = process.env.NEXT_PUBLIC_GOOGLE_AUTH_URL ?? ''; | ||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
23
to
25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Google 로그인 함수 개선 필요 함수가 단순화되었지만 몇 가지 개선이 필요합니다:
다음과 같이 개선하는 것을 권장합니다: - const handleGoogleLogin = async () => {
- window.location.href = process.env.NEXT_PUBLIC_GOOGLE_AUTH_URL ?? '';
- };
+ const handleGoogleLogin = () => {
+ const googleAuthUrl = process.env.NEXT_PUBLIC_GOOGLE_AUTH_URL;
+ if (!googleAuthUrl) {
+ toast.error('로그인 서비스에 일시적인 문제가 발생했습니다.');
+ return;
+ }
+ window.location.href = googleAuthUrl;
+ };📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||
| <div className={styles.wrapper}> | ||||||||||||||||||||||||||||||||||||||||
| <Image | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
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.
💡 Verification agent
🧩 Analysis chain
환경 변수 설정 확인 요청
Google 인증 URL 환경 변수가 올바르게 설정되었는지 확인이 필요합니다. 환경 변수가 없을 경우 사용자에게 적절한 오류 메시지를 제공하는 것이 좋겠습니다.
다음 스크립트로 환경 변수 설정을 확인해주세요:
🏁 Script executed:
Length of output: 163
다음 스크립트로
.env*파일과 코드 전체에서NEXT_PUBLIC_GOOGLE_AUTH_URL설정 및 사용처를 다시 확인해주세요:🏁 Script executed:
Length of output: 300
.env파일과 코드 전체를 숨김 파일 및 다양한 확장자까지 포함해 다시 검색해 보겠습니다:🏁 Script executed:
Length of output: 378
❗ NEXT_PUBLIC_GOOGLE_AUTH_URL 환경 변수 정의 및 에러 처리 추가 요청
현재
apps/web/src/app/join/Join.tsx에서만process.env.NEXT_PUBLIC_GOOGLE_AUTH_URL을 참조하고 있으며, 레포지토리에 해당 키를 정의한.env*파일은 보이지 않습니다. 또한 환경 변수가 없을 때 빈 문자열로 바로window.location.href를 설정하고 있어 사용자 경험(UX)이 부정확해질 수 있습니다.수정 제안:
.env,.env.local등 설정 파일에NEXT_PUBLIC_GOOGLE_AUTH_URL이 정의되어 있는지 확인하고, 없다면 추가해주세요.예시 코드 스니펫:
apps/web/src/app/join/Join.tsx📝 Committable suggestion
🤖 Prompt for AI Agents