firebase / friendlyeats-web

Apache License 2.0
463 stars 408 forks source link

Question about Page https://firebase.google.com/codelabs/firestore-web#5 Add Mock Data. #221

Closed MarGer1962 closed 2 years ago

MarGer1962 commented 2 years ago

The text is in this chapter is as follows: "The app will automatically generate a random set of restaurants objects, then call your addRestaurant function. However, you won't yet see the data in your actual web app because we still need to implement retrieving the data (the next section of the codelab)."

My question: where is the function "addRestaurant" situated? I can't find it in the index.html file nor in the \scripts directory

Hoping for an answer

jhuleatt commented 2 years ago

Hi @MarGer1962, it's in scripts/FriendlyEats.Data.js: https://github.com/firebase/friendlyeats-web/blob/e87f6d2c98791e6855438639c3c283f5abd70c44/scripts/FriendlyEats.Data.js#L18-L22