File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
apps/client/components/TicketDetails Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -1009,15 +1009,16 @@ export default function Ticket() {
10091009 < span className = "text-xs lowercase" >
10101010 { moment ( comment . createdAt ) . format ( "LLL" ) }
10111011 </ span >
1012- { comment . user &&
1013- comment . userId === user . id && (
1014- < Trash2
1015- className = "h-4 w-4 absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer text-muted-foreground hover:text-destructive"
1016- onClick = { ( ) => {
1017- deleteComment ( comment . id ) ;
1018- } }
1019- />
1020- ) }
1012+ { ( user . isAdmin ||
1013+ ( comment . user &&
1014+ comment . userId === user . id ) ) && (
1015+ < Trash2
1016+ className = "h-4 w-4 absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer text-muted-foreground hover:text-destructive"
1017+ onClick = { ( ) => {
1018+ deleteComment ( comment . id ) ;
1019+ } }
1020+ />
1021+ ) }
10211022 </ div >
10221023 < span className = "ml-1" > { comment . text } </ span >
10231024 </ li >
You can’t perform that action at this time.
0 commit comments