-
Notifications
You must be signed in to change notification settings - Fork 14
release: dev → main (펫 뽑기 UX 개편, Dialog 재설계, 로그인 복구) #399
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
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9e59ba3
feat(shop): 10펫 뽑기 UX 개편 — 카드팩 개봉 연출 (#397)
sumi-0011 9c818ff
Dialog 코어 5-size recipe 재설계 + Alert/Confirm sugar 도입 (#398)
sumi-0011 be1886c
feat(shop): 1펫 뽑기 UX 개편 — 카드 뽑기 → 풀스크린 알 부화 연출 (#396)
sumi-0011 4fe170e
feat: 로그인 끊김/실패 시 복구 UX 개선 (#387)
sumi-0011 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| 'use client'; | ||
|
|
||
| import { useEffect, useState } from 'react'; | ||
| import { useRouter, useSearchParams } from 'next/navigation'; | ||
| import { useTranslations } from 'next-intl'; | ||
| import { Button } from '@gitanimals/ui-tailwind'; | ||
|
|
||
| import { login } from '@/components/AuthButton'; | ||
| import { LOCAL_STORAGE_KEY } from '@/constants/storage'; | ||
|
|
||
| const DESKTOP_CALLBACK_HINTS = ['/auth/desktop', 'redirect_uri=']; | ||
|
|
||
| const isDesktopCallback = (value: string | null): value is string => { | ||
| if (!value) return false; | ||
| return DESKTOP_CALLBACK_HINTS.some((hint) => value.includes(hint)); | ||
| }; | ||
|
|
||
| const pageRootClass = | ||
| 'flex min-h-screen flex-col items-center justify-center p-[24px] text-white bg-[linear-gradient(180deg,#000_0%,#004875_38.51%,#005B93_52.46%,#006FB3_73.8%,#0187DB_100%)] mobile:p-[16px]'; | ||
| const cardClass = | ||
| 'flex w-fit min-w-[520px] max-w-full flex-col items-center gap-[16px] rounded-[16px] bg-white-10 p-[40px] backdrop-blur-[7px] mobile:min-w-full mobile:bg-[rgba(255,255,255,0.08)] mobile:px-[16px] mobile:py-[24px]'; | ||
|
|
||
| export default function AuthErrorPage() { | ||
| const params = useSearchParams(); | ||
| const router = useRouter(); | ||
| const t = useTranslations('Auth'); | ||
|
|
||
| const errorCode = params.get('error'); | ||
| const [savedCallbackUrl, setSavedCallbackUrl] = useState<string | null>(null); | ||
|
|
||
| useEffect(() => { | ||
| setSavedCallbackUrl(localStorage.getItem(LOCAL_STORAGE_KEY.callbackUrl)); | ||
| }, []); | ||
|
|
||
| const isDesktopFlow = isDesktopCallback(savedCallbackUrl); | ||
|
|
||
| const description = (() => { | ||
| switch (errorCode) { | ||
| case 'AccessDenied': | ||
| return t('errorDescriptionAccessDenied'); | ||
| case 'CredentialsSignin': | ||
| return t('errorDescriptionCredentials'); | ||
| default: | ||
| return t('errorDescriptionDefault'); | ||
| } | ||
| })(); | ||
|
|
||
| const handleRetry = () => { | ||
| if (isDesktopFlow && savedCallbackUrl) { | ||
| router.replace(savedCallbackUrl); | ||
| return; | ||
| } | ||
| login('/mypage'); | ||
| }; | ||
|
|
||
| const handleGoHome = () => { | ||
| router.replace('/'); | ||
| }; | ||
|
|
||
| return ( | ||
| <main className={pageRootClass}> | ||
| <section className={cardClass}> | ||
| <h1 className="glyph28-bold text-white mobile:glyph24-bold">{t('errorTitle')}</h1> | ||
| <p className="whitespace-pre-line text-center glyph16-regular text-white-75">{description}</p> | ||
| {errorCode && <p className="glyph14-regular text-white-50">code: {errorCode}</p>} | ||
| <div className="mt-[8px] flex flex-wrap justify-center gap-[12px]"> | ||
| <Button variant="primary" size="m" onClick={handleRetry}> | ||
| {isDesktopFlow ? t('errorRetryDesktop') : t('errorRetryDefault')} | ||
| </Button> | ||
| <Button variant="secondary" size="m" onClick={handleGoHome}> | ||
| {t('errorGoHome')} | ||
| </Button> | ||
| </div> | ||
| </section> | ||
| </main> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: git-goods/git-animal-client
Length of output: 440
🏁 Script executed:
Repository: git-goods/git-animal-client
Length of output: 7342
🏁 Script executed:
Repository: git-goods/git-animal-client
Length of output: 950
🏁 Script executed:
Repository: git-goods/git-animal-client
Length of output: 529
UI 컴포넌트 임포트를
@gitanimals/ui-panda로 바꾸세요apps/web/src/app/[locale]/game/quiz/_components/CreateOrSolve/SelectQuizType.tsxapps/web/src/app/[locale]/game/quiz/create/_components/QuizCreateForm.tsxapps/web/src/components/Global/useDialog.tsxDialog와Button를@gitanimals/ui-tailwind가 아니라@gitanimals/ui-panda에서 가져오도록 맞추세요.📍 Affects 3 files
apps/web/src/app/[locale]/game/quiz/_components/CreateOrSolve/SelectQuizType.tsx#L4-L4(this comment)apps/web/src/app/[locale]/game/quiz/create/_components/QuizCreateForm.tsx#L6-L6apps/web/src/components/Global/useDialog.tsx#L5-L5🤖 Prompt for AI Agents
Source: Coding guidelines