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

Kate - C18 - Lions #47

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

Kate - C18 - Lions #47

wants to merge 7 commits into from

Conversation

kate-varinda
Copy link

chat log
bot v bot

Copy link

@nancy-harris nancy-harris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent job! There's a comment below on a place to make things simpler. Great job!

Comment on lines +9 to +10
const senderReceiver =
sender === user1 ? 'chat-entry remote' : 'chat-entry local';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on doing this optional enhancement!

setChatData(newChatEntries);
}
};
const countLikes = () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of counting all of likes each time, it would work to keep the number of likes in state. Each time the like button is pressed, that count can go up by one or down by one.

return { ...chatentry };
});

const [chatData, setChatData] = useState(initialCopy);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job keeping track of state!

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