Skip to content

Commit d56d938

Browse files
committed
Revert "πŸ› Fix: 리뷰 λ“±λ‘μ‹œ μ‚¬μ§„μ°μ–΄μ„œ μ˜¬λ¦¬λŠ”κ²Œ κ°€λŠ₯ν•˜λ„λ‘ μˆ˜μ •"
This reverts commit 40e4e0c.
1 parent 908a590 commit d56d938

1 file changed

Lines changed: 4 additions & 16 deletions

File tree

β€Žsrc/app/reviews/_components/ReviewEditorModal.tsxβ€Ž

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff 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
/>

0 commit comments

Comments
Β (0)