Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions frontend/src/component/AlertModal.js

This file was deleted.

23 changes: 23 additions & 0 deletions frontend/src/component/AlertModal/SimpleModal.js
Original file line number Diff line number Diff line change
@@ -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 (
<div className="simple-modal">
<div className="simple-modal-content-container">
<p className="simple-modal-content">{content}</p>
<button className="simple-modal-button" onClick={goPage}>확인</button>
</div>
</div>
);
}

export default SimpleModal;
4 changes: 2 additions & 2 deletions frontend/src/pages/registerLesson.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -31,7 +31,7 @@ function RegisterLesson() {
<br />
<RegisterForm setContent={setContent} setShowAlert={setShowAlert} setPath={setPath}/>
{showAlert ? (
<AlertModal content={content} path={path}/>
<SimpleModal content={content} path={path}/>
) : null}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.alert-modal {
.simple-modal {
position: fixed;
top: 0;
left: 0;
Expand All @@ -11,7 +11,7 @@
z-index: 1000;
}

.alert-content-container {
.simple-modal-content-container {
background-color: white;
padding: 20px;
border-radius: 8px;
Expand All @@ -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;
Expand All @@ -38,6 +38,6 @@
cursor: pointer;
margin-top: 20px;
}
.alert-button:hover {
.simple-modal-button:hover {
background-color: #FF6060;
}