Yup is a clone of Yelp.com. It allows users to browse local businesses and leave reviews.
Live deployment on render.com.
- Users can login or signup for an account
- Login as a demo user
- Errors are styled and do not persist
-
if a user is logged in, they may:
- create a review through the new review form
- update their own reviews through the edit form, linked to in the review displayed in the business (show) page
- delete a review, also through the edit form
- if a user is not logged in, all reviews are visible, but not editable.
- Splash page with nav bar containing login links
- Simple list of businesses, click to navigate to show page
The biggest challenge for me was navigating the several asynchronous functions called through each stack, through multiple files. A simple example of my inconsistent implementation of this logic:
(1)
is a link component which throws acannot read undefined
error unless I place a ternary conditional, for it to load an empty string/target on default.(2)
is a link component from theIndexPage
, in which no conditional is necessary for the business object to load.
(1) components/EditReviewForm
<h3>
Edit Review for <Link to={business ? `/businesses/${business.id}` : "/"}>{`${
business ? business.name : ""
}`}</Link>
</h3>
(2) components/IndexPage
<div className="card-image">
<Link to={`/businesses/${business.id}`}>
<img src={business.imageUrls[1]} alt="delicious business" />
</Link>
</div>
- Search bar on home page
- Proper styling for review CRUD functionality:
- create link redirects to login page if user is not logged in
- edit/delete link is only visible if the review belongs to logged-in user
- User show/profile page, with links to their reviews
- Splash page displays featured businesses or reviews, rather than an index of businesses
- download yelp api response, to reformat and seed a larger resource
Thank you for checking out Yup. May the Schwartz be with you.
(e) 2023-24