Skip to content

Commit

Permalink
Merge pull request #141 from boostcampwm-2021/fix/modal-fix
Browse files Browse the repository at this point in the history
๋ชจ๋‹ฌ ๊ด€๋ จ ์ƒํƒœ ์ˆ˜์ •
  • Loading branch information
JunseokPark13 authored Nov 25, 2021
2 parents b0eca89 + acf693c commit a1a2e06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const CloseIcon = styled(Close)`
`;

function QuitChannelModal(): JSX.Element {
const { rightClickedChannelId, rightClickedChannelName, setIsQuitChannelModalOpen, getServerChannelList } =
const { rightClickedChannelId, rightClickedChannelName, setIsModalOpen, getServerChannelList } =
useContext(MainStoreContext);
const [selectedChannelName, setSelectedChannelName] = useState<string>('');

Expand All @@ -152,7 +152,7 @@ function QuitChannelModal(): JSX.Element {
method: 'DELETE',
});
getServerChannelList();
setIsQuitChannelModalOpen(false);
setIsModalOpen(false);
};

useEffect(() => {
Expand All @@ -164,7 +164,7 @@ function QuitChannelModal(): JSX.Element {
<ModalInnerBox>
<ModalHeader>
<ModalTitle>์ฑ„๋„ ๋‚˜๊ฐ€๊ธฐ</ModalTitle>
<ModalCloseButton onClick={() => setIsQuitChannelModalOpen(false)}>
<ModalCloseButton onClick={() => setIsModalOpen(false)}>
<CloseIcon />
</ModalCloseButton>
</ModalHeader>
Expand All @@ -175,7 +175,7 @@ function QuitChannelModal(): JSX.Element {
</ModalDescription>
<ModalButtonContainer>
<SubmitButton onClick={onClickSubmitButton}>ํ™•์ธ</SubmitButton>
<CancelButton onClick={() => setIsQuitChannelModalOpen(false)}>์ทจ์†Œ</CancelButton>
<CancelButton onClick={() => setIsModalOpen(false)}>์ทจ์†Œ</CancelButton>
</ModalButtonContainer>
</ModalInnerBox>
</Container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ function UpdateChannelModal(): JSX.Element {
watch,
formState: { errors },
} = useForm<UpdateModalForm>();
const { selectedServer, rightClickedChannelId, setIsUpdateChannelModalOpen, getServerChannelList } =
useContext(MainStoreContext);
const { selectedServer, rightClickedChannelId, setIsModalOpen, getServerChannelList } = useContext(MainStoreContext);
const [isButtonActive, setIsButtonActive] = useState<boolean>(false);

const onSubmitUpdateChannelModal = async (data: { name: string; description: string }) => {
Expand All @@ -173,7 +172,7 @@ function UpdateChannelModal(): JSX.Element {
}),
});
getServerChannelList();
setIsUpdateChannelModalOpen(false);
setIsModalOpen(false);
};

const setSelectedChannelData = async () => {
Expand All @@ -200,7 +199,7 @@ function UpdateChannelModal(): JSX.Element {
<ModalInnerBox>
<ModalHeader>
<ModalTitle>์ฑ„๋„ ์ˆ˜์ •</ModalTitle>
<ModalCloseButton onClick={() => setIsUpdateChannelModalOpen(false)}>
<ModalCloseButton onClick={() => setIsModalOpen(false)}>
<CloseIcon />
</ModalCloseButton>
</ModalHeader>
Expand Down

0 comments on commit a1a2e06

Please sign in to comment.