mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
passing address to saveRequest
This commit is contained in:
parent
47e4f4a97d
commit
fc1bac528a
5 changed files with 12 additions and 3 deletions
|
@ -13,6 +13,7 @@ export class SaveDialog extends React.Component {
|
|||
sending: false,
|
||||
finished: false,
|
||||
success: false,
|
||||
overwriting: false,
|
||||
};
|
||||
|
||||
setTitle = ({ target: { value } }) => this.setState({ title: (value || '') });
|
||||
|
@ -25,6 +26,7 @@ export class SaveDialog extends React.Component {
|
|||
const { route, stickers } = this.props.editor.dumpData();
|
||||
const { title, address } = this.state;
|
||||
const { id, token } = this.props.user;
|
||||
const { path, host } = getUrlData();
|
||||
|
||||
postMap({
|
||||
id,
|
||||
|
@ -32,7 +34,7 @@ export class SaveDialog extends React.Component {
|
|||
route,
|
||||
stickers,
|
||||
title,
|
||||
address,
|
||||
address: (toTranslit(address.trim()) || toTranslit(title.trim()) || toTranslit(path.trim())),
|
||||
}).then(console.log).catch(console.warn);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue