main
Last change
on this file since 0c6b92a was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago |
Pred finalna verzija
|
-
Property mode
set to
100644
|
File size:
896 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import { useState } from 'react';
|
---|
| 2 | import HttpService from '../../scripts/net/HttpService';
|
---|
| 3 | import styles from './SaveMap.module.css';
|
---|
[0c6b92a] | 4 | import triggerMapSave from "../../scripts/util/triggerMapSave.js";
|
---|
[d565449] | 5 |
|
---|
| 6 | const SaveMap = ({submitHandler}) => {
|
---|
| 7 | const [name, setName] = useState('');
|
---|
| 8 |
|
---|
| 9 | const handleSubmit = (event) => {
|
---|
| 10 | event.preventDefault();
|
---|
[0c6b92a] | 11 | // submitHandler();
|
---|
| 12 | // const mapSaveEvent = new CustomEvent("mapsave",{});
|
---|
| 13 | // window.dispatchEvent(mapSaveEvent)
|
---|
| 14 | triggerMapSave();
|
---|
[d565449] | 15 | };
|
---|
| 16 |
|
---|
| 17 | return (
|
---|
| 18 | <>
|
---|
| 19 | <div className={styles.saveMapContainer}>
|
---|
| 20 | <form onSubmit={handleSubmit} className={styles.saveMapForm}>
|
---|
| 21 | <div>
|
---|
| 22 | <button type="submit" className={styles.saveMapButton}>Save Map</button>
|
---|
| 23 | </div>
|
---|
| 24 | </form>
|
---|
| 25 | </div>
|
---|
| 26 | </>
|
---|
| 27 | );
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | export default SaveMap;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.