Skip to content

Commit

Permalink
fix: 팝업 클로즈 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
cobocho committed Jul 26, 2024
1 parent aeef6ed commit 07450fe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/web/src/app/(afterLogin)/workspace/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,17 @@ const Home = () => {
name: vocabulary.name,
createdAt: new Date(vocabulary.createdAt),
}))

if (window.opener) {
window.close()
}

if (response == null) {
return null
}

const isDisabled = response?.result.length >= 3

return (
<div className={workspaceContainer}>
<div className={workspaceHeader}>
Expand Down
4 changes: 4 additions & 0 deletions apps/web/src/app/(beforeLogin)/auth/token/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ const AuthCallbackPage = ({
const router = useRouter()
const queryClient = useQueryClient()

if (!access || !refresh) {
router.push('/login')
}

useEffect(() => {
Cookies.set('access', access, {
secure: true,
Expand Down

0 comments on commit 07450fe

Please sign in to comment.