-
Notifications
You must be signed in to change notification settings - Fork 38
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
Edit cors proxy
url in app
component
#43
base: master
Are you sure you want to change the base?
Conversation
@@ -22,8 +23,7 @@ const App = ({ fetching }) => { | |||
|
|||
const getFeed = (event) => { | |||
setFetching((prev) => !prev); | |||
if (event.preventDefault != null) | |||
event.preventDefault(); | |||
if (event.preventDefault != null) event.preventDefault(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can change the condition to be if (event.preventDefault)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be clear to compare it with null
instead of implicitly assume that !
{error ? renderAlert() : <div />} | ||
{!past ? <p>Please enter an RSS feed</p> : <div></div>} | ||
{error ? renderAlert() : null} | ||
{!past ? <p>Please enter an RSS feed</p> : null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use && operator !past && <p>Please enter an RSS feed</p>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just a cleaner way to do it !
@@ -9,8 +9,12 @@ export default function SearchHistory(props) { | |||
}; | |||
|
|||
const handleClose = (event) => { | |||
if (event.currentTarget.innerText != '') | |||
props.getFeed({target: {elements: {feed_url: {value: event.currentTarget.innerText}}}}); | |||
if (event.currentTarget.innerText !== "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can change the if statement to if (event.currentTarget.innerText)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same as #43 (comment)
No description provided.