Skip to content

Commit

Permalink
Release 2.0.83
Browse files Browse the repository at this point in the history
  • Loading branch information
YeonV committed Dec 12, 2023
1 parent 2e7b932 commit 76d4e51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
2 changes: 2 additions & 0 deletions src/pages/Device/Presets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const PresetsCard = ({ virtual, effectType, presets, style }: any) => {
}
)
if (response.status !== 200) {
// eslint-disable-next-line no-alert
alert('No Access')
return
}
Expand Down Expand Up @@ -138,6 +139,7 @@ const PresetsCard = ({ virtual, effectType, presets, style }: any) => {
headers: { Authorization: `Bearer ${localStorage.getItem('jwt')}` }
})
if (response.status !== 200) {
// eslint-disable-next-line no-alert
alert('No Access')
return
}
Expand Down
25 changes: 3 additions & 22 deletions src/pages/User/AvatarPicker/AvatarPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
import { useEffect, useRef, useState } from 'react'
import Cropper, { Area } from 'react-easy-crop'
import { Delete, Save, UploadFile } from '@mui/icons-material'
Expand Down Expand Up @@ -106,6 +107,7 @@ const AvatarPicker = ({
.then((res) => res.blob())
.then((blob) => {
const reader = new FileReader()
// eslint-disable-next-line func-names
reader.onloadend = async function () {
if (reader.result) {
if (newStorage === 'custom' && setAvatar) {
Expand Down Expand Up @@ -152,28 +154,7 @@ const AvatarPicker = ({
}
)

const imageUploadedJson = await imageUploaded.json()
console.log(imageUploadedJson)
// cloud
// .post(
// 'user-details',
// {
// avatarUrl: blob,
// user: localStorage.getItem('ledfx-cloud-userid'),
// users_permissions_user:
// localStorage.getItem('ledfx-cloud-userid')
// },
// {
// headers: {
// Authorization: `Bearer ${localStorage.getItem('jwt')}`
// }
// }
// )
// .then((res: any) => {
// if (res.data.length > 0 && res.data[0]) {
// console.log(res.data[0])
// }
// })
await imageUploaded.json()
}
}
}
Expand Down

0 comments on commit 76d4e51

Please sign in to comment.