Skip to content
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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

maple-megan333
Copy link

No description provided.

<button className="like">🤍</button>
</section>
</div>
);
};

ChatEntry.propTypes = {
//Fill with correct proptypes
id: PropTypes.number,

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);

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) => {

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants