Fix relation creation bug + enable favorite for custom objects (#3392)

* Fix relation creation bug

* Fix vale CI

* Fix comment bug
This commit is contained in:
Charles Bochet
2024-01-11 22:46:43 +01:00
committed by GitHub
parent 3ad032cdc1
commit 10fd67ba32
9 changed files with 223 additions and 99 deletions

View File

@ -67,8 +67,8 @@ export const CommentHeader = ({ comment, actionBar }: CommentHeaderProps) => {
const showDate = beautifiedCreatedAt !== '';
const author = comment.author;
const authorName = author.name.firstName + ' ' + author.name.lastName;
const avatarUrl = author.avatarUrl;
const authorName = author?.name?.firstName + ' ' + author?.name?.lastName;
const avatarUrl = author?.avatarUrl;
const commentId = comment.id;
return (
@ -77,7 +77,7 @@ export const CommentHeader = ({ comment, actionBar }: CommentHeaderProps) => {
<Avatar
avatarUrl={avatarUrl}
size="md"
colorId={author.id}
colorId={author?.id}
placeholder={authorName}
/>
<StyledName>{authorName}</StyledName>