-
Notifications
You must be signed in to change notification settings - Fork 153
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
Lions - Ivy S #120
base: main
Are you sure you want to change the base?
Lions - Ivy S #120
Conversation
… always get passed in with the tests
….id becuase sometimes the backend info given does not include id
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.
Nice job! This project is green.
@@ -1,16 +1,51 @@ | |||
import React from 'react'; | |||
import './App.css'; | |||
// import ChatEntry from './components/ChatEntry'; |
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.
Remember to remove unneeded comments.
if (message.id === updatedMessage.id) { | ||
return updatedMessage; | ||
} | ||
else { | ||
return message | ||
} |
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.
Small nitpick: the else is not needed here.
return ( | ||
<div id="App"> | ||
<header> | ||
<h1>Application title</h1> | ||
</header> | ||
<h1>Heard it Through The Ivy Vine</h1> |
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.
😂
const updatedMessage = { | ||
sender: props.sender, | ||
id: props.id, | ||
body: props.body, | ||
timeStamp: props.timeStamp, | ||
liked: !props.liked, | ||
}; |
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.
Consider using ...
to make this more concise
liked: PropTypes.bool, | ||
onToggleLike : PropTypes.func, |
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.
Don't forget the isRequired
!
}; | ||
|
||
ChatLog.propTypes = { | ||
entries: PropTypes.array.isRequired, |
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.
Consider using arrayOf
to make the prop types more explicit.
No description provided.