Skip to content

Commit

Permalink
574 swap usernames to full names on comments page (#575)
Browse files Browse the repository at this point in the history
* Change group names to voter affiliations

* Update comments response type

* Show full name instead of username
  • Loading branch information
camilovegag authored May 28, 2024
1 parent f232da7 commit fbe26fa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 8 additions & 1 deletion packages/api/src/types/CommentType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ export type GetCommentsRequest = {
optionId: string;
};

export type GetCommentsResponse = (Comment & { user?: { id: string; username: string } })[];
export type GetCommentsResponse = (Comment & {
user?: {
id: string;
username: string;
firstName: string;
lastName: string;
};
})[];

export type PostCommentRequest = {
value: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ function CommentsTable({ comment }: CommentsTableProps) {
<FlexRow>
<Comment>{comment.value}</Comment>
</FlexRow>
<Author title={`@${comment.user?.username}`}>@{comment.user?.username}</Author>
<Author title={`@${comment.user?.username}`}>
{comment.user?.firstName} {comment.user?.lastName}
</Author>
<FormattedDate>{formattedDate}</FormattedDate>
<FlexRow
$gap="0.5rem"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function ResultsTable({ $expanded, option, onClick }: ResultsTableProps) {
<Bold>Distinct groups:</Bold> {option.distinctGroups}
</Body>
<Body>
<Bold>Group names:</Bold> {option.listOfGroupNames.join(', ')}
<Bold>Voter affiliations:</Bold> {option.listOfGroupNames.join(', ')}
</Body>
</FlexColumn>
</Card>
Expand Down

0 comments on commit fbe26fa

Please sign in to comment.