Tasti per modificare lo stato di una soluzione e dettagli estetici

This commit is contained in:
2022-11-18 02:32:28 +01:00
parent 9dd5a259ae
commit ea3b7aeecf
7 changed files with 183 additions and 57 deletions
-25
View File
@@ -1,25 +0,0 @@
import { ProblemId, SolutionId, UserId } from './model'
// export function refToUserId(ref: string): UserId {
// if (!ref.startsWith('user/')) {
// throw new Error(`"${ref}" is not a reference to a User`)
// }
// return ref.slice('user/'.length)
// }
// export function refToProblemId(ref: string): ProblemId {
// if (!ref.startsWith('problem/')) {
// throw new Error(`"${ref}" is not a reference to a Problem`)
// }
// return ref.slice('problem/'.length)
// }
// export function refToSolutionId(ref: string): SolutionId {
// if (!ref.startsWith('solution/')) {
// throw new Error(`"${ref}" is not a reference to a Solution`)
// }
// return ref.slice('solution/'.length)
// }
+1 -1
View File
@@ -48,7 +48,7 @@ export type Problem = {
// Solutions
//
export type SolutionStatus = 'pending' | 'rejected' | 'accepted'
export type SolutionStatus = 'pending' | 'correct' | 'wrong'
export type SolutionId = string