File tree Expand file tree Collapse file tree 1 file changed +4
-16
lines changed
src/app/reviews/_components Expand file tree Collapse file tree 1 file changed +4
-16
lines changed 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