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

Sea Turtles Natalia Woodson #90

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

Conversation

NataliaWoodson
Copy link

No description provided.

Copy link

@tgoslee tgoslee left a comment

Choose a reason for hiding this comment

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

Great job Natalia. I added some feedback to get your console errors in learn to go away. Let me know if you have any questions.

const [localTextColor, setLocalTextColor] = useState('black');
const [remoteTextColor, setRemoteTextColor] = useState('black');

const updateChatData = (updatedEntry) => {
Copy link

Choose a reason for hiding this comment

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

👍🏽

Comment on lines +42 to +47
id: PropTypes.number.isRequired,
sender: PropTypes.string,
body: PropTypes.string,
timestamp: PropTypes.string,
liked: PropTypes.bool,
onUpdate: PropTypes.func.isRequired,
Copy link

Choose a reason for hiding this comment

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

In Learn, we are seeing errors for some of your propTypes. I would only use isRequired on the props that must be passed for the component to render to pass the tests. In this case, the only required props would be the sender, body, timeStamp props.

import PropTypes from 'prop-types';

const ChatLog = (props) => {
const chatEntries = props.entries.map((entry) => {
Copy link

Choose a reason for hiding this comment

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

you can use index with map. This should get rid of your key on each child error.

const chatEntries = prop.entries.map((entry, i) => 
...
<ChatEntry
     key={i}


ChatLog.propTypes = {
entries: PropTypes.array.isRequired,
onUpdateChat: PropTypes.func.isRequired,
Copy link

Choose a reason for hiding this comment

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

onUpdateChat is also giving a console error in learn. If you want this prop to be required then you could update the test to make sure it covers this prop as well or you can make it not required.

import React from 'react';
import PropTypes from 'prop-types';

const ColorChoice = (props) => {
Copy link

Choose a reason for hiding this comment

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

Love this added feature!

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