Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jin-co committed Aug 31, 2023
1 parent 1dbd52f commit c341993
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions React/test-housing/src/pages/CreateListing.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export const CreateListing = () => {
const navigate = useNavigate()

const onMutate = (e) => {
console.log(e.target)
console.log(e.target.files)
if (e.target.value === 'false') {
setFormData((prev) => ({
...prev,
Expand All @@ -54,6 +56,11 @@ export const CreateListing = () => {
...prev,
[e.target.id]: true
}))
} else if (e.target.files) {
setFormData((prev) => ({
...prev,
images: e.target.files
}))
} else {
setFormData((prev) => ({
...prev,
Expand Down Expand Up @@ -98,14 +105,14 @@ export const CreateListing = () => {
).catch(() => {
return
})

console.log('imageUrls: ', imageUrls)
let geolocation = {}
if (geolocationEnabled) {

} else {
geolocation.lat = latitude
geolocation.log = longitude
}
}

const formDataCopy = {
...formData,
Expand Down

0 comments on commit c341993

Please sign in to comment.