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

Seattle Otters - Joanna #108

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

Seattle Otters - Joanna #108

wants to merge 2 commits into from

Conversation

JoannaOpera
Copy link

No description provided.

Copy link

@jbieniosek jbieniosek left a comment

Choose a reason for hiding this comment

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

Great work on this project Joanna! Small note, even though JS does not require any particular tab structure, consistent tabs can improve readability. This was very close to passing all tests, removing one extra line from ChatEntry fixed the errors. This project is green.

minute: '2-digit',
})
: timeStampMessage(daysSinceMsg)}
</p>
<button className="like">🤍</button>

Choose a reason for hiding this comment

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

Removing this line causes all tests to pass.

Suggested change
<button className="like">🤍</button>

msgStamp = `${yrs} years ago`;
}
return msgStamp;
}

Choose a reason for hiding this comment

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

I can see that you put a lot of work into this section, but just so you're aware, the Timestamp component that was provided with the project will do all of this work for you and render the correct relative time. It takes the timeStamp from the message data as a prop.

<button className="like">🤍</button>
<button className="like" onClick={() => toggleLiked(props.id)}>
{`${props.liked ? '❤️' : '🤍'}`}

Choose a reason for hiding this comment

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

This can be written slightly simpler:

Suggested change
{`${props.liked ? '❤️' : '🤍'}`}
{props.liked ? '❤️' : '🤍'}

Strings inside of {} in JSX will automatically render as text.

const entries = props.entries;
console.log(entries);

const entryLog = entries.map((entry) => {

Choose a reason for hiding this comment

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

👍

<button className="like">🤍</button>
<button className="like" onClick={() => toggleLiked(props.id)}>

Choose a reason for hiding this comment

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

💯

: entry;
});
setEntries(newEntries);
};

Choose a reason for hiding this comment

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

Great callback function!

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