Last change
on this file was d7b7f00, checked in by Gorazd Biskoski <gorazdbiskoskii@…>, 4 weeks ago |
Add project
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | import styles from "../../css/AdminPanelCss/modal-style.module.css";
|
---|
2 |
|
---|
3 | const ReviewModal = ({ isOpen, onClose, reviewData, onRemove }) => {
|
---|
4 | if (!isOpen) return null;
|
---|
5 | // console.log(reviewData);
|
---|
6 |
|
---|
7 | const handleRemove = () => {
|
---|
8 | onRemove(reviewData.id);
|
---|
9 | onClose();
|
---|
10 | };
|
---|
11 |
|
---|
12 | return (
|
---|
13 | <div className={styles.modalOverlay}>
|
---|
14 | <div className={styles.modalContent}>
|
---|
15 | <button className={styles.closeButton} onClick={onClose}>×</button>
|
---|
16 | <h2>Review Details</h2>
|
---|
17 | <p><strong>Name:</strong> {reviewData.userName} {reviewData.userSurname}</p>
|
---|
18 | <p><strong>Email:</strong> {reviewData.userEmail}</p>
|
---|
19 | <p><strong>Recipe Name:</strong> {reviewData.recipeName}</p>
|
---|
20 | <p><strong>Rating:</strong> {reviewData.rating}</p>
|
---|
21 | <p><strong>Review Text:</strong> {reviewData.review}</p>
|
---|
22 | <button onClick={handleRemove} className={styles.removeButton}>
|
---|
23 | Remove Review
|
---|
24 | </button>
|
---|
25 | </div>
|
---|
26 | </div>
|
---|
27 | );
|
---|
28 | };
|
---|
29 |
|
---|
30 | export default ReviewModal; |
---|
Note:
See
TracBrowser
for help on using the repository browser.