Skip to content

Commit

Permalink
[FE] BUG: 모달에서 링크로 이동 시 모든 창을 닫도록 closeAll 추가 #1668
Browse files Browse the repository at this point in the history
  • Loading branch information
wet6123 committed Sep 24, 2024
1 parent 7a25cc6 commit 5276f4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/src/Cabinet/components/Modals/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Button from "@/Cabinet/components/Common/Button";
import { ReactComponent as CheckIcon } from "@/Cabinet/assets/images/checkIcon.svg";
import { ReactComponent as ErrorIcon } from "@/Cabinet/assets/images/errorIcon.svg";
import { ReactComponent as NotificationIcon } from "@/Cabinet/assets/images/notificationSign.svg";
import useMenu from "@/Cabinet/hooks/useMenu";
import useMultiSelect from "@/Cabinet/hooks/useMultiSelect";

/**
Expand Down Expand Up @@ -63,6 +64,7 @@ const Modal: React.FC<{ modalContents: IModalContents }> = (props) => {
} = props.modalContents;
const { isMultiSelect, closeMultiSelectMode } = useMultiSelect();
const navigator = useNavigate();
const { closeAll } = useMenu();

return (
<>
Expand Down Expand Up @@ -127,6 +129,7 @@ const Modal: React.FC<{ modalContents: IModalContents }> = (props) => {
{url && urlTitle && (
<UrlSectionStyled
onClick={() => {
closeAll();
navigator(url);
}}
>
Expand Down

0 comments on commit 5276f4f

Please sign in to comment.