-
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
Ocelots - Megan Maple #136
base: main
Are you sure you want to change the base?
Conversation
<button className="like">🤍</button> | ||
</section> | ||
</div> | ||
); | ||
}; | ||
|
||
ChatEntry.propTypes = { | ||
//Fill with correct proptypes | ||
id: PropTypes.number, |
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 use of propTypes to control variable requirements
@@ -15,13 +15,17 @@ const time_difference = (posted) => { | |||
}; | |||
|
|||
const ChatEntry = ({ id, sender, body, timeStamp, liked }) => { | |||
const [isliked, setLiked] = useState(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.
nice use of useState to track changes
import './App.css'; | ||
import chatMessages from './data/messages.json'; | ||
import ChatLog from './components/ChatLog.js'; | ||
|
||
const App = () => { | ||
const likeCount = chatMessages.reduce((a, obj) => { |
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.
a clever use of reduce
to count
No description provided.