Closed shizuko-akamoto closed 4 years ago
I've changed the margin bottom on searchInput box, hopefully this looks better?
And regarding the styling of the Image popup, I'm gonna log a bug for that. We can come back to it when time allows. Issue logged: https://github.com/shizuko-akamoto/Trecipe/issues/69
I've changed the margin bottom on searchInput box, hopefully this looks better?
Yeaa that is much better thanks š
And regarding the styling of the Image popup, I'm gonna log a bug for that. We can come back to it when time allows. Issue logged: #69
Sounds good sounds good š
Closes #16
Set up Trecipe Page: Integrated Destination Card list, Add Destination SearchBar popup, CoverPhoto to Trecipe page.
I'm also going to add in the StaticMap after #60 gets merged into master.(Added!) The two feedback we got from Hailin is also addressed here. Those were:How destination information are passed around from redux store to DestinationCard component
TrecipesList store Maintains a list of
TrecipeModel
, wheredestinations
is an ordered array of destination ids contained in the trecipe,completed
is a set of dest ids of checked off destinations.Destinations store Maintains a map of
trecipeId
to an array of unorderedDestinationModel
s (maybe we can even make it a Set). EachDestinationModel
has an id.Trecipe
page gets as prop, the id of the trecipe it has to render. ThistrecipeId
comes from Route params (ie. when clicking on each TC inMyTrecipes
page, the path will change from/
to/:trecipeId
, and Trecipe page that gets mounted receives thetrecipeId
part).In
mapStateToProps
of Trecipe page, it takes thetrecipeId
from Route params to get the list of destination models from redux store's Destinations state. Note that these destinations might be unordered. So, we get the ordered destIds fromTrecipeModel
to sort them. This extra sorting is quite annoying however. When we're setting up the backend to retrieve destinations by trecipe id, we should make sure it sends in correct order.Trecipe
page passes as a prop toDestintionCard
component, theDestinationModel
it has to display, along with callback methods to call when Delete or Check button is clicked.