Skip to content
Snippets Groups Projects
Commit 89f3579c authored by michael.minelli's avatar michael.minelli
Browse files

ExerciseResultsFile => Store icon property with identifier and not value

parent f370f8b0
Branches
Tags
No related merge requests found
......@@ -16,7 +16,7 @@ const ExerciseResultsFile = z.object({
otherInformations: z.array(z.object({
name : z.string(),
description : z.string().optional(),
icon : z.enum(Object.keys(Icon) as [ firstKey: string, ...otherKeys: Array<string> ]).optional().transform(value => value ? (Icon as { [index: string]: string })[value] : undefined),
icon : z.enum(Object.keys(Icon) as [ firstKey: string, ...otherKeys: Array<string> ]).optional(),
itemsOrInformations: z.union([ z.array(z.string()), z.string() ])
}))
.optional()
......
......@@ -10,7 +10,7 @@ const Icon = {
NULL : '',
NONE : '',
BADMINTON: '🏸'
} as const;
} as { [index: string]: string };
export default Icon;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment