File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
apps/frontend/src/app/question/[id] Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ interface Submission {
21
21
submittedAt : string ;
22
22
language : string ;
23
23
matchedUser : string ;
24
+ otherUser : string ;
24
25
historyDocRefId : string ;
25
26
code : string ;
26
27
}
@@ -162,6 +163,7 @@ export default function QuestionPage() {
162
163
language : data . language ,
163
164
matchedUser :
164
165
username == data . matchedUser ? data . user : data . matchedUser ,
166
+ otherUser : data . user ,
165
167
historyDocRefId : data . historyDocRefId ,
166
168
code : data . code ,
167
169
} ) ;
@@ -279,7 +281,13 @@ export default function QuestionPage() {
279
281
Language: { submission ?. language || "-" }
280
282
</ div >
281
283
< div className = "submission-header-detail" >
282
- Matched with: { submission ?. matchedUser || "-" }
284
+ Matched with:{ " " }
285
+ { submission ?. matchedUser
286
+ ? // Check to ensure that matched user is correct, otherwise swap with otherUser
287
+ username == submission . matchedUser
288
+ ? submission . otherUser
289
+ : submission . matchedUser
290
+ : "-" }
283
291
</ div >
284
292
</ div >
285
293
You can’t perform that action at this time.
0 commit comments