Closed cemgunay closed 10 months ago
this commit fixes #10
AmenityItem
AuthInput
AuthTextArea
AutoCompleteField
BedroomItem
BedTypeItem
CreateListingBottomBar
CreateListingTopBar
CreateListingLayout
DatePicker
IncrementalBathroomInput
IncrementalBedroomInput
Input
ListingPreview
EnterAddress
Map
OverviewCard
PrivacyType
PropertyType
TextArea
UtilityItem
ListingFormContext
Listing
Signup
Info
Overview
AboutYourPlace
Location
Basics
Amenities
Images
Title
Description
Price
Dates
Publish
Preview
New reducers folder with the reducers used to create listing
Listing
api/listings/index.js
The new listings photos wont show up because of how I changed the photo url to be cloudinaryUrl but we can update that later when we have more listings with the new way for testing
Finally got around to reviewing this branch! Sorry for the delay man. Everything looks great tho this is topppp notch work. Here are a few thoughts that came to mind:
<Link>
and link over to either the create-listing/overview
page.
DatePicker
we accept a prop setFormData
, and on the create-listing/[listingId]/dates
page we are passing the handleDateChange
function to this prop.handleDateChange
function takes a second argument called property
, on which we are running the .includes()
function. If this argument is not passed, we end up trying to call undefined.includes()
which throws an error.propertyToUpdate
prop includes "viewingDates", the setFormData
function is called with the date as first argument and the index (calculated from the propertyToUpdate
prop) as second argument, and everything runs fine. However, if the propertyToUpdate
prop doesn't include "viewingDates" (as is the case when we're setting move in/move out dates instead of the viewing dates), then the setFormData
function is called with no second argument (bc this was the original functionality for when we use the DatePicker
on the sign up page).handleDateChange
(via calling the setFormData
prop function) with no second argument and we get an error.setFormData
in the default case on the DatePicker
, but then that would break the DatePicker
functionality on the sign up pageDatePicker
component (maybe renaming the first one to DateOfBirthPicker
). That way we can handle the new year range we need as well as this small setFormData
/handleDateChange
bug in like a brand new component instead of trying to adapt the old one to work in two different scenarios.DateOfBirthPicker
would be the exact same as what it was before any changes for the create listing stuff, and then the new DatePicker
would have the new year range as well as checks to handle the various cases for handleDateChange
. Lmk if this makes sense/if you agree!IncrementalBedroomInput
a little larger
this commit fixes #6
usePusher
/pages/listing/[listingId]
channel.unsubscribe
topusher.unsubscribe('channel')
lolif (!pusher.channel("bids-channel"))