From 56ddd08c72f00bc06d428d6743035f1f9ee7a042 Mon Sep 17 00:00:00 2001 From: choba Date: Mon, 15 Jan 2024 12:44:34 +0100 Subject: [PATCH] Edit. delete console.log & unnecessary code --- src/components/common/PopupMessage.tsx | 27 ++------------------------ 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/src/components/common/PopupMessage.tsx b/src/components/common/PopupMessage.tsx index b2c5bd8..0507213 100644 --- a/src/components/common/PopupMessage.tsx +++ b/src/components/common/PopupMessage.tsx @@ -4,37 +4,19 @@ import { Icon, Typography, Popover, Paper } from '@mui/material'; import Spacer from '@/components/common/Spacer'; import { useRecoilState, useRecoilValue } from 'recoil'; import { theme } from '@/styles'; -import { currentPopupMessageType, popupMessageText } from '@/store/common'; -import { useEffect, useState } from 'react'; +import { popupMessageText } from '@/store/common'; +import { useState } from 'react'; import { popupShowState } from '@/store/popupMessage'; -import { DEFAULT_POPUP_MSG_TIMEOUT } from '@/constants/sample'; -interface PopoverVirtualElement { - nodeType: 1; - getBoundingClientRect: () => DOMRect; -} - -const selection = window.getSelection(); const PopupMessage = () => { const popupText = useRecoilValue(popupMessageText); - const popupMessageType = useRecoilValue(currentPopupMessageType); const [isPopupShow, setIsPopupShow] = useRecoilState(popupShowState); const [anchorEl, setAnchorEl] = useState(null); const { background, icon } = theme.palette.popup; - - useEffect(() => { - - setTimeout(() => { - console.log(isPopupShow) - console.log(popupText) - console.log(popupMessageType) - setIsPopupShow(false); - }, DEFAULT_POPUP_MSG_TIMEOUT); - }, []); return ( { setIsPopupShow(false); }} anchorOrigin={{ - // vertical: 'bottom', - // horizontal: 'center', vertical: 'top', horizontal: 'center', }} transformOrigin={{ - // vertical: 'center', - // horizontal: 'center', vertical: 'top', horizontal: 'center', - }} >