commented out logo fetching functionality in EditroomDialog

This commit is contained in:
mushka 2022-08-23 14:31:21 +03:00
parent 9dcc3af710
commit 097072919f

View File

@ -33,23 +33,21 @@ const EditRoomDialog = ({
const onEditRoom = () => onSave(roomParams);
useEffect(async () => {
console.log(fetchedRoomParams.uploadedFileSrc);
if (fetchedRoomParams.uploadedFileSrc)
await fetch(
"http://192.168.0.100:8092/storage/room_logos/root/sbox9DOCSPACE%20CUSTOM%20ROOM%209_orig_887-339.jpeg"
).then((res) => {
const buf = res.arrayBuffer();
const file = new File([buf], "fetchedImage", { type: "image/png" });
console.log(file);
setRoomParams({
...roomParams,
icon: { ...roomParams.icon, uploadedFile: file },
});
});
}, []);
console.log(roomParams);
// useEffect(async () => {
// console.log(fetchedRoomParams.uploadedFileSrc);
// if (fetchedRoomParams.uploadedFileSrc)
// await fetch(
// "http://192.168.0.100:8092/storage/room_logos/root/sbox9DOCSPACE%20CUSTOM%20ROOM%209_orig_887-339.jpeg"
// ).then((res) => {
// const buf = res.arrayBuffer();
// const file = new File([buf], "fetchedImage", { type: "image/png" });
// console.log(file);
// setRoomParams({
// ...roomParams,
// icon: { ...roomParams.icon, uploadedFile: file },
// });
// });
// }, []);
return (
<ModalDialog