minor fix

This commit is contained in:
lion
2019-01-30 14:35:19 +01:00
parent be39fb3043
commit 25663ddf4a
4 changed files with 12 additions and 7 deletions

View File

@@ -49,7 +49,7 @@ class App extends React.Component {
onUserDataChange({ info: "olx_url", value: url });
if (url) {
axios
.get(`/api/${url}`)
.get(`/items/${url}`)
.then(response => {
onItemsChanged(response.data.items);
onUserDataChange({

View File

@@ -57,7 +57,7 @@ class NotificationModal extends React.Component {
userdata: { email, last_date, olx_url }
} = this.props;
axios
.post("/api/marketalerts", {
.post("/marketalerts", {
email,
last_date,
olx_url
@@ -138,7 +138,12 @@ class NotificationModal extends React.Component {
</DialogContent>
<DialogActions className={classes.modalFooter}>
{validEmail ? (
<Button className={classes.saveButton}>Save</Button>
<Button
onClick={this.handleSaveMarketAlert}
className={classes.saveButton}
>
Save
</Button>
) : (
<Tooltip
title="Provide a valid email"