Skip to content

Commit e8e6d21

Browse files
committed
Modify table to let admin users have show detail button
1 parent 3b9552d commit e8e6d21

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Frontend/src/components/question/Question.jsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,18 +181,19 @@ function Question() {
181181
if (valueA === "Hard" || valueB === "Easy") return 1;
182182
}
183183
},
184-
...(isAdmin ? [{
185-
field: "action",
184+
{
185+
field: "details",
186186
width: 200,
187187
resizable: false,
188188
sortable: false,
189-
cellRenderer: editDeleteButtonComponent
190-
}] : [{
191-
field: "details",
189+
cellRenderer: showDetailButtonComponent },
190+
...(isAdmin ? [{
191+
field: "action",
192192
width: 200,
193193
resizable: false,
194194
sortable: false,
195-
cellRenderer: showDetailButtonComponent }])
195+
cellRenderer: editDeleteButtonComponent
196+
}] : [])
196197
];
197198

198199
return (

0 commit comments

Comments
 (0)