Removed unused import statement#217
Open
tylerwelsh wants to merge 65 commits intobradtraversy:masterfrom
Open
Conversation
Code smell #1 for me is fixed.
Removed unused Import
The "return" is not needed.
…pendent statement
Removed unnecessary return statement
Product carousel - Extract this nested ternary operation into an inde…
…dependent statement
OrderScreen.js - Extract nested ternary operation to if-statements
HomeScreen.js - Extract this nested ternary operation into if statements
working on ordrescreen.js smells
Rating.js - Extract all nested ternary operations into Stars class
made the key variable unique to the item instead of the list index. This is because list indexes change and would make the key variable unsafe.
I made the html "key" variable unique to the item instead of the list index that we are looping through. This is because list index could change. Instead, we used the "item.name" since each item has a unique "name" to identify it.
This code smell was changed for better readability. What is happening is if text is truthful (meaning it is not null, undefined, 0, etc) then we render what the text prop actually is. Using the ternary operator we are able to read it much better as "If text is true and not null, then render text, otherwise, render nothing."
Using the latter "\d" is is not only shorter in terms of expression length, but also easier to read and thus to maintain. I replaced the bulky "[0-9]" with a more concise equivalent "\d"
This reverts commit ae0ef32.
Added the "save for later" feature to the project. For phase 2 it is required to be at least 30% completed. So far, I have done a lot of it, for phase 3 I need to implement adding it to the cart from the save for later page.
…Model.js, and contactController.js. The frontend is working but the email is not sending, need to troubleshoot further.
… have to update the email functionality so it actually sends the email. Before it was not ever getting to the point where it said email sent, it would just say something went wrong.
…ontactController. email not sending
…inish documentation
This reverts commit d05b234.
…created/modified files. Removed unused imports across all created/modified files. Renamed \“contactReducer.js\” to \“contactReducers.js\” to match the established format of the names of the reducer files in the code base. (The reducer file names are all plural)
Changes look good. Tested on my machine and it works!
started implementing social login with auth0
Can move an item from the "saved for later" list to the "cart"
Fixed a bug where when the user logs out and logs back in with a DIFFERENT account, the same items in the "save for later" list were still there. Added to the userActions.js file to remove the later items list from the user's local storage when they log out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was the first code smell I resolved.