Skip to content

task solution#2017

Open
W3zzie wants to merge 2 commits into
mate-academy:masterfrom
W3zzie:develop
Open

task solution#2017
W3zzie wants to merge 2 commits into
mate-academy:masterfrom
W3zzie:develop

Conversation

@W3zzie

@W3zzie W3zzie commented Sep 24, 2024

Copy link
Copy Markdown

@zibi-dev zibi-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good job! 🥇 . I have left some comments for future reference.

Comment on lines +9 to +13
export const UserInfo: React.FC<Props> = ({ user }) => (
<a className="UserInfo" href={`mailto:${user?.email}`}>
{user?.name}
</a>
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Destructure user object

import { CommentInfo } from '../CommentInfo';

export const CommentList: React.FC = () => <>Put the list here</>;
export const CommentList: React.FC<{ comments: Comment[] }> = ({

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Once you declare the type interface and once you do not, stay consistent with your approach.

import { Comment } from '../../types/Comment';

export const CommentInfo: React.FC = () => <>Put the comment here</>;
export const CommentInfo: React.FC<{ comment: Comment }> = ({

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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