File tree Expand file tree Collapse file tree
app/(pages)/judges/_components/AuthForms Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,24 +18,12 @@ interface OptionItem {
1818 rank : number ;
1919}
2020
21- // Medtech was not appearing as an option, causing failed document validation
22- const extraDomainOptions : Array < { text : string ; domain : string } > = [
23- { text : 'MedTech' , domain : 'medtech' } ,
24- ] ;
25-
2621const initialOptions = [
27- ...new Set ( [
28- ...Object . values ( optedHDTracks ) . map (
29- ( track ) => track . domainDisplayName ?? ''
30- ) ,
31- ...extraDomainOptions . map ( ( option ) => option . text ) ,
32- ] ) ,
22+ ...new Set (
23+ Object . values ( optedHDTracks ) . map ( ( track ) => track . domainDisplayName ?? '' )
24+ ) ,
3325] . filter ( ( option ) => option !== '' ) ;
3426
35- const extraDisplayNameToDomainMap : Map < string , string > = new Map (
36- extraDomainOptions . map ( ( option ) => [ option . text , option . domain ] )
37- ) ;
38-
3927export default function DetailForm ( { id } : any ) {
4028 const router = useRouter ( ) ;
4129
@@ -114,13 +102,9 @@ export default function DetailForm({ id }: any) {
114102 setLoading ( true ) ;
115103 setError ( '' ) ;
116104
117- const specialties : string [ ] = options . map ( ( option ) => {
118- return (
119- displayNameToDomainMap . get ( option . text ) ??
120- extraDisplayNameToDomainMap . get ( option . text ) ??
121- ''
122- ) ;
123- } ) ;
105+ const specialties : string [ ] = options . map (
106+ ( option ) => displayNameToDomainMap . get ( option . text ) ?? ''
107+ ) ;
124108
125109 const userRes = await updateUser ( id , {
126110 $set : {
You can’t perform that action at this time.
0 commit comments