diff --git a/.env.development.local.example b/.env.development.local.example deleted file mode 100644 index 457490e..0000000 --- a/.env.development.local.example +++ /dev/null @@ -1,2 +0,0 @@ -REACT_APP_SUPABASE_URL= -REACT_APP_SUPABASE_KEY= \ No newline at end of file diff --git a/feedback.md b/feedback.md new file mode 100644 index 0000000..5a62b4e --- /dev/null +++ b/feedback.md @@ -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 diff --git a/functions/cat-endpoint.js b/functions/cat-endpoint.js deleted file mode 100644 index 2cd5ae9..0000000 --- a/functions/cat-endpoint.js +++ /dev/null @@ -1,21 +0,0 @@ -// const fetch = require('node-fetch'); -// require('dotenv').config(); - -// exports.handler = async (event, context) => { -// try { -// const response = await fetch('https://cat-fact.herokuapp.com/facts'); -// const data = await response.json(); -// const json = JSON.stringify({ data }); - -// return { -// statusCode: 200, -// body: json -// }; -// } catch (error) { -// console.log(error); -// return { -// statusCode: 500, -// body: JSON.stringify({ error: 'Failed fetching data' }), -// }; -// } -// }; diff --git a/package-lock.json b/package-lock.json index 2f2abb5..99aa50a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5348,6 +5348,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "optional": true, "engines": { "node": ">=8" } diff --git a/src/App.js b/src/App.js index 430e9fd..c076b48 100644 --- a/src/App.js +++ b/src/App.js @@ -17,17 +17,18 @@ function App() {
- + - + - + - {currentUser ? : } - + {currentUser ? : } + {/* I feel like this should be /about rather than /aboutme */} +
diff --git a/src/Components/NavHeader/NavHeader.js b/src/Components/NavHeader/NavHeader.js index 884eb20..edbd1fe 100644 --- a/src/Components/NavHeader/NavHeader.js +++ b/src/Components/NavHeader/NavHeader.js @@ -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()); }; diff --git a/src/services/yelp.js b/src/services/yelp.js index 92cc7c3..892ae27 100644 --- a/src/services/yelp.js +++ b/src/services/yelp.js @@ -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 }; }