Closed cemgunay closed 10 months ago
Refer to Create-Listing and Manage-Listing pull requests for details on those
this commit fixes issues #20 , #10, #19, #16
radio-group.jsx
shadcn
radio group componentCustomDialog.js
EditBasics.js
title
, description
, and price
steps from create-listing
EditAmenities.js
AmenityItem
component to show and toggle the amenitiesEditLocation
location
step in create-listing
location
form in create-listing
BedroomItem
setState
prop and use that if dispatch
isnt provided as prop since this is also used in create-listing
IncrementalBedroomInput.js
setState
prop and use that if dispatch
isnt provided as prop since this is also used in create-listing
IncrementalBathroomInput.js
setState
prop and use that if dispatch
isnt provided as prop since this is also used in create-listing
EditPropertyAndRooms.js
basics
step in create-listing
Carousel.js
Carousel
component with margin and padding using cn
from classnames
EditImages.js
images.js
in create-listing
routeDatePicker.js
DatePickerBirthday.js
, DatePickerMovingDates.js
, DatePickerViewingDates.js
to make the logic simplerDatePickerBirthday
DatePicker
that was used in signup.js
DatePickerMovingDates
minDate
and maxDate
DatePickerViewingDates
EditPricingAndDates.js
price
and dates
steps in create-listing
startOfDay
from date-fns
to ensure no timing issuesEditUtilities.js
UtilityItem
component to show and toggle the utilitiesedit.js
loadsh
library to deep compare arrays and objects when neededimages.js
signin.js
saveUser
functionsignup.js
DatePickerBirthday
instead of DatePicker
saveUser
functiondates.js
DatePickerMovingDates
and DatePickerViewingDates
instead of DatePicker
startOfDay
from date-fns
to ensure no timing issuespreview.js
preview
page to manage-listings
route which is the same as the preview
page from the create-listings
routeAuthContext.js
token
which is the encoded JWT tokensaveUser
function it takes token
as an arg and stores it in localStorage
signOut
function it removes token
from localStorage
alsoListingFormContext.js
token
from useAuth
and passes it in the pushToDatabase
function to be used in the Authorization
header in the PUT API call in form "Bearer {token}"
which will be used to validate userconstants.js
authentication.js
Authorization
listings/index.js
authentication
call and return its response
token
was provided if not return the error response from authentication
Listing.js
null
This stuff is fireee bro it all works so well! I love the multi-step format for adding a new listing, the image stuff is amazing, and I really love the preview at the last step too.
Manage listing is also working brilliantly and I love the styling there didn't even change anything.
One small point, I made two listings while I was running through and testing the process, but when I view the manage listings page, the two I had just made didn't seem to show up. I feel like this will end up being sorted out once we streamline all the request/listing logic tho so maybe not a huge deal yet? Not too sure
Anyways, here are the small styling changes I made!
IncrementalBathroomInput
buttons weren't consistent in size with the IncrementalBedroomInput
ones so I streamlined those, also made the text on both slightly bigger/host/create-listing/info
page, which I am viewing as the start of the "create a listing" process. I considered that the start point could also be the /host/create-listing/overview
page, but the /info
page has a button linking to that page so I assumed that was the best starting point. Lmk if you prefer something else!To address the listings not showing up, I added the "draft" boolean field to Listing model that I was just manually doing in MongoDB but forgot to put in the code, great catch!
Merged the create listings and manage listings branch into one and will be adding edit listings to this branch