web client v1.0 (production)

This commit is contained in:
2020-10-08 21:29:06 +02:00
parent d0dab37649
commit 20c7dd18a7
22 changed files with 289 additions and 33 deletions

View File

@@ -3,7 +3,7 @@ import ImageUploadWide from "../Input/ImageUploadWide";
import ButtonSecondary from "../Input/ButtonSecondary";
import ButtonPrimary from "../Input/ButtonPrimary";
import { useDispatch, useSelector } from "react-redux";
import { notification } from "../../actions";
import { notification, refreshUserData } from "../../actions";
import { showBackdrop, hideBackdrop } from "../../actions/toggles.js";
import axios from "axios";
import { backend } from "../../config";
@@ -60,6 +60,7 @@ export default function EditRestaurantPhoto(props) {
.then((res) => {
dispatch(hideBackdrop());
dispatch(notification("Zmieniono zdjęcie.", "success"));
dispatch(refreshUserData(token));
})
.catch((e) => {
dispatch(hideBackdrop());