Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Np mj sort items soon integers #66

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

MonicaDJohnson
Copy link
Contributor

No description provided.

@@ -38,19 +69,20 @@ const List = props => {
// Sort the data
sort="name"
// Only fetch the items associated with the token saved in localStorage
filter={['token', '==', token || getCurrentToken() || 'no token set']}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Careful here @MonicaDJohnson. This is a breaking change when the user doesn't already have a token saved in localStorage. I know this is from the branch this PR is based on, but just a heads up.

@@ -38,19 +69,20 @@ const List = props => {
// Sort the data
sort="name"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What else might you pass here besides name? Are the items always in alphabetical order—why?

'token',
'==',
token || getCurrentToken() || 'no token set',
'nextExpectedPurchase',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevelikesmusic I think this is wrong but what I was trying to attempt is to compare nextExpectedPurchase with an integer and if that integer is <= 7 then I want only those items shown.

</div>
<ul className="shopping-list">
{shoppingList
.filter(item => filterListInput(item.name))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevelikesmusic can we add the comparison here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants