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

Lions - Jessica A. #115

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

Conversation

Jessicaenvisions
Copy link

No description provided.

Copy link

@alope107 alope107 left a comment

Choose a reason for hiding this comment

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

Although this doesn't fully meet the requirements of the project, there's a lot of good code you have here. This is a yellow - you do not need to revisit this project if you do not wish to 🙂 Nice job!

Comment on lines +1 to +7
{
"python.testing.pytestArgs": [
"node_modules"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}

Choose a reason for hiding this comment

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

I don't think these are correct settings - we're not using Python. Also, your individual VS Code settings should not be committed. They should be added to the .gitignore if needed.


const App = () => {
const [chatLogList, setchatLogList] = useState([]);

Choose a reason for hiding this comment

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

The state should start from the chatMessages, not empty.

return (
<div id="App">
<header>
<h1>Application title</h1>
</header>
<main>
<ChatLog chatLogList={chatMessages} />

Choose a reason for hiding this comment

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

This should be using the state instead of the messages directly

Comment on lines 7 to +10
const ChatEntry = (props) => {
const sender = props.sender;
const senderBody = props.body;
const timeStamp = props.timeStamp;

Choose a reason for hiding this comment

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

In the future consider destructuring props in the constructor.

const sender = props.sender;
const senderBody = props.body;
const timeStamp = props.timeStamp;
const [isLiked, setIsLiked] = useState(false);

Choose a reason for hiding this comment

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

This type of state should be lifted up

Comment on lines +24 to +34
ChatLog.propTypes = {
chatLogList: PropTypes.arrayOf(
PropTypes.shape({
id: PropTypes.number.isRequired,
sender: PropTypes.string.isRequired,
body: PropTypes.string.isRequired,
timeStamp: PropTypes.string.isRequired,
liked: PropTypes.bool.isRequired,
})
),
};

Choose a reason for hiding this comment

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

Make sure to make the overall array prop as required.

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