Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .env.development.local.example

This file was deleted.

12 changes: 12 additions & 0 deletions feedback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Restaurant Roulette

Good work y'all -- nice job pulling in the Yelp API and getting the locations services to work properly. I know that was tricky. Here's some general feedback but overall nice work:

- Your styling could use a little love - the background feels disjointed from the rest of the styles -- if you're going to use a picture background, you can always use coolrs generate pallette from image feature which will allow your colors to integrate a little better. Also in the future, try not to leave your CSS until the very end -- it always takes longer than you think.
- You've got some inconsistency with your upper / lower case naming conventions - just a few examples:
- Components folder, Context folder and Views folder should be lower case (only upper case your folders if they match the name of a component)
- Restaurant-List should be RestaurantList
- restaurantlist.css should be RestaurantList.css
- There's a bug if you try to add a note when you're not logged in - you should not show the form if you aren't logged in
- Its a bit of a bummer there's not an actual roulette aspect to this -- there are some open source React roulette libraries you could try to incorporate which would be fun
- Nice work on the restaurant context
21 changes: 0 additions & 21 deletions functions/cat-endpoint.js

This file was deleted.

1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ function App() {
<BrowserRouter>
<NavHeader />
<div className="App">
<Route exact path={'/'}>
<Route exact path="/">
<Home />
</Route>
<Route exact path={'/restaurants/:alias'}>
<Route exact path="/restaurants/:alias">
<RestaurantDetail />
</Route>
<Route path={'/auth'}>
<Route path="/auth">
<Auth />
</Route>
<Route path={'/profile'}>{currentUser ? <Profile /> : <Redirect to={'/auth'} />}</Route>
<Route exact path={'/aboutme'}>
<Route path="/profile">{currentUser ? <Profile /> : <Redirect to="/auth" />}</Route>
{/* I feel like this should be /about rather than /aboutme */}
<Route exact path="/aboutme">
<AboutMe />
</Route>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/Components/NavHeader/NavHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default function NavHeader() {
const handleLogout = async () => {
await logout();
setCurrentUser(null);
// this causes some weirdness if you run logout from the detail page
setRestaurants(await fetchRestaurantZip());
};

Expand Down
2 changes: 2 additions & 0 deletions src/services/yelp.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export async function fetchRestaurants(search = '', lat = '', long = '') {
const { businesses } = await resp.json();
const favorites = await getFavorites();
const mutated = businesses.map((business) => {
// we should try to avoid nested for loops just b/c
// it can become a performance issue when the arrays get big
for (const favorite of favorites) {
if (favorite.restaurant_alias === business.alias) return { ...business, checked: true };
}
Expand Down