File tree Expand file tree Collapse file tree 1 file changed +15
-17
lines changed Expand file tree Collapse file tree 1 file changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -57,29 +57,27 @@ const Shortcuts = () => {
57
57
return (
58
58
< div className = "md:border-b mb-3 lg:mb-0 lg:border-r lg:border-b-0 border-gray-300 dark:border-gray-700 pr-1" >
59
59
< ul className = "w-full tracking-wide flex flex-wrap lg:flex-col pb-1 lg:pb-0" >
60
- { configs ?. shortcuts ? (
61
- Object . entries ( DEFAULT_SHORTCUTS ) ) . map ( ( [ key , item ] , index ) => (
62
- key === "past" ? (
63
- ( Array . isArray ( item ) ? item : [ ] ) . map ( ( item , index ) => (
64
- < ItemTemplate key = { index } item = { item } >
65
- < >
66
- { configs && configs . shortcuts && ( key in configs . shortcuts ) ? (
67
- callPassFunction ( configs . shortcuts [ key ] , item . daysNumber )
68
- ) : item . text }
69
- </ >
70
- </ ItemTemplate >
71
- ) )
72
- ) : (
60
+ { ( Object . entries ( DEFAULT_SHORTCUTS ) ) . map ( ( [ key , item ] , index ) => (
61
+ key === "past" ? (
62
+ ( Array . isArray ( item ) ? item : [ ] ) . map ( ( item , index ) => (
73
63
< ItemTemplate key = { index } item = { item } >
74
64
< >
75
65
{ configs && configs . shortcuts && ( key in configs . shortcuts ) ? (
76
- configs . shortcuts [ key as keyof typeof configs . shortcuts ]
77
- ) : ( "text" in item ? item . text : "" ) }
66
+ callPassFunction ( configs . shortcuts [ key ] , item . daysNumber )
67
+ ) : item . text }
78
68
</ >
79
69
</ ItemTemplate >
80
- )
70
+ ) )
71
+ ) : (
72
+ < ItemTemplate key = { index } item = { item } >
73
+ < >
74
+ { configs && configs . shortcuts && ( key in configs . shortcuts ) ? (
75
+ configs . shortcuts [ key as keyof typeof configs . shortcuts ]
76
+ ) : ( "text" in item ? item . text : "" ) }
77
+ </ >
78
+ </ ItemTemplate >
81
79
)
82
- ) : null }
80
+ ) ) }
83
81
</ ul >
84
82
</ div >
85
83
) ;
You can’t perform that action at this time.
0 commit comments