web client v0.2 (add restaurant OK, settings OK)

This commit is contained in:
2020-09-19 18:16:26 +02:00
parent 732ad74657
commit 68ecf13aa1
16 changed files with 546 additions and 86 deletions

View File

@@ -6,7 +6,7 @@ import axios from "axios";
export default function ImageUpload(props) {
const [imagePreviewURL, setPreviewURL] = useState(props.img);
let showCircle = false;
const token = useSelector((state) => state.data.jwt);
const token = useSelector((state) => state.data.userData.jwt);
const handleInputChange = (event) => {
let data = new FormData();
@@ -33,7 +33,7 @@ export default function ImageUpload(props) {
let imagePreview = (
<div className="image-preview">
{showCircle ? <CircularProgress /> : "Proszę wybrać obraz."}
{showCircle ? <CircularProgress /> : "Proszę wybrać obraz. (max. 2MB)"}
</div>
);
if (imagePreviewURL) {