File tree Expand file tree Collapse file tree 1 file changed +35
-28
lines changed
app/src/molecules/InterventionModal Expand file tree Collapse file tree 1 file changed +35
-28
lines changed Original file line number Diff line number Diff line change @@ -111,35 +111,42 @@ export function CategorizedStepContent(
111
111
justifyContent = { JUSTIFY_FLEX_START }
112
112
gap = { SPACING . spacing4 }
113
113
>
114
- < StyledText oddStyle = "bodyTextSemiBold" desktopStyle = "captionSemiBold" >
115
- { props . bottomCategoryHeadline }
116
- </ StyledText >
117
- { props . bottomCategoryCommands . map ( ( command , idx ) => (
118
- < Flex
119
- gap = { SPACING . spacing8 }
120
- key = { `${ props . bottomCategory } ${
121
- command ?. command ?. commandType ?? 'unknown'
122
- } ${ idx } `}
123
- css = { idx > 0 ? HIDE_ON_TOUCHSCREEN_STYLE : undefined }
114
+ { props . bottomCategoryCommands [ 0 ] != null ? (
115
+ < StyledText
116
+ oddStyle = "bodyTextSemiBold"
117
+ desktopStyle = "captionSemiBold"
124
118
>
125
- < CommandIndex
126
- index = { `${
127
- command ?. index == null ? '' : command . index . toString ( )
128
- } `}
129
- allowSpaceForNDigits = { maxIndexLength }
130
- />
131
- < Command
132
- { ...commandAndState (
133
- command ,
134
- props . bottomCategory ,
135
- props . commandTextData
136
- ) }
137
- robotType = { props . robotType }
138
- aligned = "left"
139
- forceTwoLineClip
140
- />
141
- </ Flex >
142
- ) ) }
119
+ { props . bottomCategoryHeadline }
120
+ </ StyledText >
121
+ ) : null }
122
+ { props . bottomCategoryCommands . map ( ( command , idx ) => {
123
+ return command != null ? (
124
+ < Flex
125
+ gap = { SPACING . spacing8 }
126
+ key = { `${ props . bottomCategory } ${
127
+ command ?. command ?. commandType ?? 'unknown'
128
+ } ${ idx } `}
129
+ css = { idx > 0 ? HIDE_ON_TOUCHSCREEN_STYLE : undefined }
130
+ >
131
+ < CommandIndex
132
+ index = { `${
133
+ command ?. index == null ? '' : command . index . toString ( )
134
+ } `}
135
+ allowSpaceForNDigits = { maxIndexLength }
136
+ />
137
+ < Command
138
+ { ...commandAndState (
139
+ command ,
140
+ props . bottomCategory ,
141
+ props . commandTextData
142
+ ) }
143
+ robotType = { props . robotType }
144
+ aligned = "left"
145
+ forceTwoLineClip
146
+ />
147
+ </ Flex >
148
+ ) : null
149
+ } ) }
143
150
</ Flex >
144
151
</ Flex >
145
152
)
You can’t perform that action at this time.
0 commit comments