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 {
2121 submittedAt : string ;
2222 language : string ;
2323 matchedUser : string ;
24+ otherUser : string ;
2425 historyDocRefId : string ;
2526 code : string ;
2627}
@@ -162,6 +163,7 @@ export default function QuestionPage() {
162163 language : data . language ,
163164 matchedUser :
164165 username == data . matchedUser ? data . user : data . matchedUser ,
166+ otherUser : data . user ,
165167 historyDocRefId : data . historyDocRefId ,
166168 code : data . code ,
167169 } ) ;
@@ -279,7 +281,13 @@ export default function QuestionPage() {
279281 Language: { submission ?. language || "-" }
280282 </ div >
281283 < 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+ : "-" }
283291 </ div >
284292 </ div >
285293
You can’t perform that action at this time.
0 commit comments