Open
Conversation
AlishaPrasad
reviewed
Nov 2, 2021
|
|
||
| const AddForm = () => { | ||
| const [categoryOpen, setCategoryOpen] = useState(false); | ||
| const cat = categories; |
There was a problem hiding this comment.
Why do you need to assign to another const?
AlishaPrasad
reviewed
Nov 2, 2021
| const [modalOpen, setModalOpen] = useState(false); | ||
| const handleTitle = (e) => { | ||
| setTitle(e.target.value); | ||
| }; |
AlishaPrasad
reviewed
Nov 2, 2021
| setAmount(""); | ||
| return; | ||
| } | ||
| setAmount(val); |
There was a problem hiding this comment.
you could use ternary ..
isNaN(val) ? setAmount(“”) : setAmount(val);
AlishaPrasad
reviewed
Nov 2, 2021
| const handleSubmit = () => { | ||
| if (title === "" || amount === "" || !category) { | ||
| const notify = () => toast("Please enter complete data"); | ||
| notify(); |
There was a problem hiding this comment.
do u need notify const? You could directly call the toast method
AlishaPrasad
reviewed
Nov 2, 2021
| <input | ||
| placeholder="Give a name to your expenditure" | ||
| value={title} | ||
| onChange={(e) => handleTitle(e)} |
There was a problem hiding this comment.
Suggested change
| onChange={(e) => handleTitle(e)} | |
| onChange={handleTitle} |
AlishaPrasad
reviewed
Nov 2, 2021
| <input | ||
| placeholder="Enter Amount" | ||
| className="amount-input" | ||
| onChange={(e) => handleAmount(e)} |
There was a problem hiding this comment.
Suggested change
| onChange={(e) => handleAmount(e)} | |
| onChange={handleAmount} |
AlishaPrasad
reviewed
Nov 2, 2021
| } | ||
|
|
||
| @media only screen and (max-width: 1024px) { | ||
| .card-title { |
There was a problem hiding this comment.
Suggested change
| .card-title { | |
| .card-title, | |
| .card-amount { |
AlishaPrasad
reviewed
Nov 2, 2021
| } | ||
| .card-amount { | ||
| font-size: 18px; | ||
| } |
AlishaPrasad
reviewed
Nov 2, 2021
| } | ||
|
|
||
| @media only screen and (max-width: 512px) { | ||
| .card-title { |
There was a problem hiding this comment.
Suggested change
| .card-title { | |
| .card-title, | |
| .card-amount { |
AlishaPrasad
reviewed
Nov 2, 2021
| } | ||
| .card-amount { | ||
| font-size: 16px; | ||
| } |
AlishaPrasad
reviewed
Nov 2, 2021
|
|
||
| const Footer = () => { | ||
| return <footer>Made with ❤️ by Rifaq</footer>; | ||
| }; |
AlishaPrasad
reviewed
Nov 2, 2021
| type="text" | ||
| placeholder="Search for Expenses" | ||
| value={query} | ||
| onChange={(event) => handleQuery(event)} |
There was a problem hiding this comment.
Suggested change
| onChange={(event) => handleQuery(event)} | |
| onChange={handleQuery} |
AlishaPrasad
reviewed
Nov 2, 2021
| padding: 12px 0; | ||
| align-items: center; | ||
| } | ||
| .home-topfold { |
There was a problem hiding this comment.
Suggested change
| .home-topfold { | |
| .home-topfold, | |
| .add-topfold { |
AlishaPrasad
reviewed
Nov 2, 2021
| display: flex; | ||
| justify-content: space-between; | ||
| flex: 1; | ||
| } |
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.
No description provided.