From 0dbaab80d91cd1c769045db41f2e9ad192eaefe5 Mon Sep 17 00:00:00 2001 From: byunyc124 Date: Sat, 12 Aug 2023 21:00:38 +0900 Subject: [PATCH] =?UTF-8?q?[RENAME]=20modal=EC=9D=B4=EB=A6=84=EC=9D=84=20s?= =?UTF-8?q?imple=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/component/AlertModal.js | 23 ------------------- .../src/component/AlertModal/SimpleModal.js | 23 +++++++++++++++++++ frontend/src/pages/registerLesson.js | 4 ++-- .../modal/{alertModal.css => simpleModal.css} | 10 ++++---- 4 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 frontend/src/component/AlertModal.js create mode 100644 frontend/src/component/AlertModal/SimpleModal.js rename frontend/src/style/modal/{alertModal.css => simpleModal.css} (84%) diff --git a/frontend/src/component/AlertModal.js b/frontend/src/component/AlertModal.js deleted file mode 100644 index 6d8b2a5d..00000000 --- a/frontend/src/component/AlertModal.js +++ /dev/null @@ -1,23 +0,0 @@ -import { useNavigate } from "react-router-dom"; -import '../style/modal/alertModal.css'; - -function AlertModal({ content, path }) { - const navigate = useNavigate(); - - const goPage = () => { - if (path !== null) { - navigate(path); - } - } - - return ( -
-
-

{content}

- -
-
- ); -} - -export default AlertModal; \ No newline at end of file diff --git a/frontend/src/component/AlertModal/SimpleModal.js b/frontend/src/component/AlertModal/SimpleModal.js new file mode 100644 index 00000000..3347ac8c --- /dev/null +++ b/frontend/src/component/AlertModal/SimpleModal.js @@ -0,0 +1,23 @@ +import { useNavigate } from "react-router-dom"; +import '../../style/modal/simpleModal.css'; + +function SimpleModal({ content, path }) { + const navigate = useNavigate(); + + const goPage = () => { + if (path !== null) { + navigate(path); + } + } + + return ( +
+
+

{content}

+ +
+
+ ); +} + +export default SimpleModal; \ No newline at end of file diff --git a/frontend/src/pages/registerLesson.js b/frontend/src/pages/registerLesson.js index da00e8b4..9f9dce3b 100644 --- a/frontend/src/pages/registerLesson.js +++ b/frontend/src/pages/registerLesson.js @@ -7,7 +7,7 @@ import RegisterForm from '../component/RegisterLesson/RegisterForm'; import { useDispatch } from 'react-redux'; import PreviousLesson from '../component/RegisterLesson/PreviousLesson' import { resetlessonReducer } from '../store/lesson/lesson'; -import AlertModal from '../component/AlertModal'; +import SimpleModal from '../component/AlertModal/SimpleModal'; function RegisterLesson() { const dispatch = useDispatch(); @@ -31,7 +31,7 @@ function RegisterLesson() {
{showAlert ? ( - + ) : null} ); diff --git a/frontend/src/style/modal/alertModal.css b/frontend/src/style/modal/simpleModal.css similarity index 84% rename from frontend/src/style/modal/alertModal.css rename to frontend/src/style/modal/simpleModal.css index e3a89e3b..41e5afe2 100644 --- a/frontend/src/style/modal/alertModal.css +++ b/frontend/src/style/modal/simpleModal.css @@ -1,4 +1,4 @@ -.alert-modal { +.simple-modal { position: fixed; top: 0; left: 0; @@ -11,7 +11,7 @@ z-index: 1000; } -.alert-content-container { +.simple-modal-content-container { background-color: white; padding: 20px; border-radius: 8px; @@ -23,13 +23,13 @@ margin-bottom: 100px; } -.alert-content { +.simple-modal-content { background-color: #FFFDFD; padding: 20px; text-align: center; } -.alert-button { +.simple-modal-button { background-color: #FF7A42; color: #FFFDFD; padding: 10px 20px; @@ -38,6 +38,6 @@ cursor: pointer; margin-top: 20px; } -.alert-button:hover { +.simple-modal-button:hover { background-color: #FF6060; } \ No newline at end of file