Skip to content

Commit

Permalink
Refactor: remove ReviewPhotoStep
Browse files Browse the repository at this point in the history
  • Loading branch information
wbazant committed Dec 26, 2024
1 parent 4ee1d24 commit 899ee2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/components/form/LocationForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import Label from '../ui/Label'
import LoadingIndicator from '../ui/LoadingIndicator'
import { Checkbox, Select, Textarea } from './FormikWrappers'
import { ProgressButtons, StyledForm } from './FormLayout'
import { ReviewPhotoStep, ReviewStep } from './ReviewForm'
import { ReviewStep } from './ReviewForm'
import TypesSelect from './TypesSelect'
import { useInvisibleRecaptcha } from './useInvisibleRecaptcha'

Expand Down Expand Up @@ -247,7 +247,6 @@ export const LocationForm = ({ editingId, initialValues }) => {
{!editingId && (
<>
<ReviewStep />
<ReviewPhotoStep />
</>
)}
<ProgressButtons>
Expand Down
7 changes: 2 additions & 5 deletions src/components/form/ReviewForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,12 @@ export const ReviewStep = ({ standalone, hasHeading = true }) => {
}
/>
</FormRatingWrapper>

<PhotoUploader name="review.photos" label="Upload images" />
</>
)
}

export const ReviewPhotoStep = () => (
<PhotoUploader name="review.photos" label="Upload images" />
)

const RatingLabeledRow = styled(LabeledRow)`
> div > label {
color: ${({ theme }) => theme.text};
Expand Down Expand Up @@ -208,7 +206,6 @@ export const ReviewForm = ({
return (
<Form>
<ReviewStep standalone hasHeading={editingId == null} />
<ReviewPhotoStep />
<ProgressButtons>
<div style={{ textAlign: editingId ? 'center' : 'left' }}>
<Button
Expand Down

0 comments on commit 899ee2f

Please sign in to comment.