main
Last change
on this file was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago |
Pred finalna verzija
|
-
Property mode
set to
100644
|
File size:
962 bytes
|
Line | |
---|
1 | import styles from "../EntranceModal/EntranceModal.module.css";
|
---|
2 | import React, {useEffect} from "react";
|
---|
3 |
|
---|
4 | export default function ModalDisplayConnections({connections,removePinFromList}){
|
---|
5 |
|
---|
6 | useEffect(() => {
|
---|
7 | console.log("CONNNECTIONS: " + connections);
|
---|
8 | }, []);
|
---|
9 |
|
---|
10 | return (
|
---|
11 | <>
|
---|
12 | <h3>Connections:</h3>
|
---|
13 | <ul className={styles.pinList}>
|
---|
14 | {connections.length > 0 ? (
|
---|
15 | connections.map((pin, index) => (
|
---|
16 | <li key={index} className={styles.pinItem}>
|
---|
17 | {pin}
|
---|
18 | <button onClick={() => removePinFromList(pin)} className={styles.removeButton}>
|
---|
19 | Remove
|
---|
20 | </button>
|
---|
21 | </li>
|
---|
22 | ))
|
---|
23 | ) : (
|
---|
24 | <li>No connections added</li>
|
---|
25 | )}
|
---|
26 | </ul>
|
---|
27 | <br/>
|
---|
28 | </>
|
---|
29 | )
|
---|
30 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.