Skip to content

Commit

Permalink
[FE] fix: 첫번째 step에서 모달이 닫히지 않는 오류 수정 (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
zelkovaria committed Feb 13, 2025
1 parent 48c8092 commit 24f1b57
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/frontend/src/components/guild/GuildList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ import { CreateGuildStep } from '../types';
import * as S from './styles';

const GuildList = () => {
const { openModal } = useModalStore();
const { openModal, modal } = useModalStore();
const [currentModal, setCurrentModal] = useState<CreateGuildStep | null>(null);

const handleChangeModal = (modal: React.ReactNode) => {
openModal('basic', modal);
};

useEffect(() => {
if (!modal.basic) {
setCurrentModal(null);
}
}, [modal]);

useEffect(() => {
if (currentModal === null) return;

Expand Down

0 comments on commit 24f1b57

Please sign in to comment.