This repository was archived by the owner on Oct 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +39
-10
lines changed
Expand file tree Collapse file tree 5 files changed +39
-10
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ This is a solution to the [Product feedback app challenge on Frontend Mentor](ht
55## Features
66
77- 👤 User Authentication & profile update
8- - 🛡️ Admin Controls (Official Replies, Update Status, Censor Feedback )
8+ - 🛡️ Admin Controls (Official Replies, Update Status)
99- ➕ Create, Edit, Delete product feedback Requests
1010- 👍 Upvote & Sort feedbacks by Votes/Comments
1111- 🏷️ Filter suggestions by Category
1212- 💬 Comment & Reply (Threaded Conversations)
13- - 📊 Roadmap Tracking (Planned, In Progress, Live)
13+ - 📊 Roadmap Tracking with Kanban view for admins (Planned, In Progress, Live)
1414
1515## stack
1616
Original file line number Diff line number Diff line change 66}
77
88.comment__user {
9- display : grid ;
9+ display : flex ;
1010 grid-row : 1 / 2 ;
1111 grid-column : 2 / 3 ;
12+ /* align-items: center; */
13+ gap : 0.5em ;
14+ }
15+
16+ .comment__user-info {
17+ display : grid;
1218}
1319
1420.comment__fullName {
1521 font-size : var (--fs-100 );
1622 font-weight : var (--fw-bold );
1723 letter-spacing : -0.19px ;
1824 color : var (--clr-deep-slate-blue );
25+ white-space : nowrap;
1926}
2027
2128.comment__username {
2229 font-size : var (--fs-100 );
30+ white-space : nowrap;
31+ }
32+
33+ .comment__official-container {
34+ width : 20px ;
35+ height : 20px ;
36+ }
37+
38+ .comment__official {
39+ width : 100% ;
40+ height : 100% ;
2341}
2442
2543.comment__reply-button {
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import ReplyForm from "./reply-form";
66import { ThreadedComment } from "../types" ;
77import { useIsLoggedIn } from "@/features/user/hooks" ;
88import { useNavigate } from "@tanstack/react-router" ;
9+ import IconOfficial from "@/assets/icon-official.svg?react" ;
910
1011interface CommentListItemProps extends React . ComponentProps < "article" > {
1112 comment : ThreadedComment ;
@@ -51,12 +52,19 @@ function CommentListItem({ comment, parentComment }: CommentListItemProps) {
5152 < AvatarFallback > { initials } </ AvatarFallback >
5253 </ Avatar >
5354 < div className = { styles [ "comment__user" ] } >
54- < strong className = { styles [ "comment__fullName" ] } >
55- { comment . createdBy . fullName }
56- </ strong >
57- < span className = { styles [ "comment__username" ] } >
58- @{ comment . createdBy . username }
59- </ span >
55+ < div className = { styles [ "comment__user-info" ] } >
56+ < strong className = { styles [ "comment__fullName" ] } >
57+ { comment . createdBy . fullName }
58+ </ strong >
59+ < span className = { styles [ "comment__username" ] } >
60+ @{ comment . createdBy . username }
61+ </ span >
62+ </ div >
63+ { comment . createdBy . role == "admin" && (
64+ < div className = { styles [ "comment__official-container" ] } >
65+ < IconOfficial className = { styles [ "comment__official" ] } />
66+ </ div >
67+ ) }
6068 </ div >
6169 < button
6270 onClick = { handleReplyClick }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export type Comment = {
55 content : string ;
66 feedbackId : string ;
77 parentId : string | null ;
8- createdBy : Pick < User , "id" | "username" | "fullName" | "avatar" > ;
8+ createdBy : Pick < User , "id" | "username" | "fullName" | "avatar" | "role" > ;
99} ;
1010
1111export type ThreadedComment = Comment & {
You can’t perform that action at this time.
0 commit comments