Changeset 0c6b92a for imaps-frontend/src/components/SaveMap/SaveMap.jsx
- Timestamp:
- 12/12/24 17:06:06 (5 weeks ago)
- Branches:
- main
- Parents:
- d565449
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/src/components/SaveMap/SaveMap.jsx
rd565449 r0c6b92a 2 2 import HttpService from '../../scripts/net/HttpService'; 3 3 import styles from './SaveMap.module.css'; 4 import triggerMapSave from "../../scripts/util/triggerMapSave.js"; 4 5 5 6 const SaveMap = ({submitHandler}) => { … … 8 9 const handleSubmit = (event) => { 9 10 event.preventDefault(); 10 submitHandler(name); 11 // submitHandler(); 12 // const mapSaveEvent = new CustomEvent("mapsave",{}); 13 // window.dispatchEvent(mapSaveEvent) 14 triggerMapSave(); 11 15 }; 12 16 … … 15 19 <div className={styles.saveMapContainer}> 16 20 <form onSubmit={handleSubmit} className={styles.saveMapForm}> 17 <div>18 <label htmlFor="name">Map Name: </label>19 <input20 type="text"21 id="name"22 value={name}23 onChange={(e) => setName(e.target.value)}24 placeholder="Enter map name"25 required26 className={styles.saveMapInput}27 />28 </div>29 21 <div> 30 22 <button type="submit" className={styles.saveMapButton}>Save Map</button>
Note:
See TracChangeset
for help on using the changeset viewer.