File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
governance/xc_admin/packages/xc_admin_frontend/components Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,6 @@ const Arrow = ({ className }: { className?: string }) => (
22
22
</ svg >
23
23
)
24
24
25
- /**
26
- * Format display name from enum name (e.g., "PYTH_CORE" -> "Pyth Core")
27
- */
28
- const formatDisplayName = ( value : ProgramType ) : string => {
29
- const enumName = PROGRAM_TYPE_NAMES [ value ]
30
- return enumName
31
- }
32
-
33
25
/**
34
26
* Component that allows users to switch between different Pyth programs
35
27
* (Core, Lazer, etc.)
@@ -42,7 +34,7 @@ const ProgramSwitch = ({ light = false }: { light?: boolean }) => {
42
34
. filter ( ( value ) : value is ProgramType => typeof value === 'number' ) // Filter out reverse mappings
43
35
. map ( ( value ) => ( {
44
36
value,
45
- label : formatDisplayName ( value ) ,
37
+ label : PROGRAM_TYPE_NAMES [ value ] ,
46
38
} ) )
47
39
48
40
return (
@@ -56,7 +48,7 @@ const ProgramSwitch = ({ light = false }: { light?: boolean }) => {
56
48
>
57
49
< span className = "mr-3" >
58
50
{ programOptions . find ( ( option ) => option . value === programType )
59
- ?. label || formatDisplayName ( programType ) }
51
+ ?. label || PROGRAM_TYPE_NAMES [ programType ] }
60
52
</ span >
61
53
< Arrow className = { `${ open ? 'rotate-180' : '' } ` } />
62
54
</ Menu . Button >
You can’t perform that action at this time.
0 commit comments