Skip to content

Commit

Permalink
chore(fe): prevent signup modal reset (#1757)
Browse files Browse the repository at this point in the history
* chore(fe): prevent signup modal reset

* chore(fe): prevent modal closing when clicking outside
  • Loading branch information
jwoojin9 authored Jul 3, 2024
1 parent a94b344 commit 1ae99e9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/frontend/components/auth/HeaderAuthPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
} from '@/components/ui/dropdown-menu'
import { cn } from '@/lib/utils'
import useAuthModalStore from '@/stores/authModal'
import useSignUpModalStore from '@/stores/signUpModal'
import { LogOut, User, UserRoundCog } from 'lucide-react'
import type { Session } from 'next-auth'
import { signOut } from 'next-auth/react'
Expand All @@ -36,7 +35,6 @@ export default function HeaderAuthPanel({
const { currentModal, hideModal, showSignIn, showSignUp } = useAuthModalStore(
(state) => state
)
const { setModalPage } = useSignUpModalStore((state) => state)
return (
<div className="ml-2 flex items-center gap-2">
{session ? (
Expand Down Expand Up @@ -89,7 +87,6 @@ export default function HeaderAuthPanel({
<Button
onClick={() => {
showSignUp()
setModalPage(0)
}}
variant={variants[group]}
className={cn(
Expand All @@ -104,6 +101,9 @@ export default function HeaderAuthPanel({
onOpenAutoFocus={(e) => {
e.preventDefault()
}}
onInteractOutside={(e) => {
e.preventDefault()
}}
className="min-h-[30rem] max-w-[20.5rem]"
>
<AuthModal />
Expand Down Expand Up @@ -191,7 +191,6 @@ export default function HeaderAuthPanel({
className="flex cursor-pointer items-center gap-1 font-semibold"
onClick={() => {
showSignUp()
setModalPage(0)
}}
>
Sign Up
Expand Down

0 comments on commit 1ae99e9

Please sign in to comment.