File tree Expand file tree Collapse file tree
src/app/reviews/_components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,23 +87,12 @@ const ReviewEditorModal = ({
8787 const handleFocusContent = ( ) => {
8888 setIsContentValid ( true )
8989 }
90- const handleImageUpload = async ( e : React . ChangeEvent < HTMLInputElement > ) => {
90+ const handleImageUpload = ( e : React . ChangeEvent < HTMLInputElement > ) => {
9191 const file = e . target . files ?. [ 0 ]
9292 if ( ! file ) return
93-
94- try {
95- setValue ( 'image' , file )
96- setValue ( 'imagePreview' , URL . createObjectURL ( file ) )
97- setValue ( 'isImageChanged' , true )
98- } catch ( error ) {
99- console . error ( 'μ΄λ―Έμ§ μ
λ‘λ μ€ μ€λ₯ λ°μ:' , error )
100- toast ( {
101- title : 'μ΄λ―Έμ§ μ
λ‘λμ μ€ν¨νμ΄μ.' ,
102- description : 'λ€μ μλν΄μ£ΌμΈμ.' ,
103- variant : 'destructive' ,
104- position : 'center' ,
105- } )
106- }
93+ setValue ( 'image' , file )
94+ setValue ( 'imagePreview' , URL . createObjectURL ( file ) )
95+ setValue ( 'isImageChanged' , true )
10796 }
10897
10998 const handleImageDelete = ( ) => {
@@ -244,7 +233,6 @@ const ReviewEditorModal = ({
244233 < input
245234 type = "file"
246235 accept = "image/*"
247- capture = "environment"
248236 className = "hidden"
249237 onChange = { handleImageUpload }
250238 />
You canβt perform that action at this time.
0 commit comments