@@ -67,13 +67,12 @@ export default function MobileWorkflowSteps() {
6767 }
6868 } ;
6969
70- const currentLabel = useMemo ( ( ) => {
71- return workflow . find ( ( w ) => w . id === currentstep ) ?. label ?? '' ;
72- } , [ currentstep , workflow ] ) ;
70+ const currentLabel = useMemo (
71+ ( ) => workflow . find ( ( w ) => w . id === currentstep ) ?. label ?? '' ,
72+ [ currentstep , workflow ]
73+ ) ;
7374 const currentTip = useMemo ( ( ) => {
74- if ( ! currentLabel ) {
75- return '' ;
76- }
75+ if ( ! currentLabel ) return '' ;
7776 const tipKey = toCamel ( currentLabel + 'Tip' ) ;
7877 return Object . prototype . hasOwnProperty . call ( t , tipKey )
7978 ? t . getString ( tipKey )
@@ -86,10 +85,10 @@ export default function MobileWorkflowSteps() {
8685 useLayoutEffect ( ( ) => {
8786 const el = dropdownRef . current ;
8887 if ( ! el ) return ;
89- const update = ( ) => {
90- const style = window . getComputedStyle ( el ) ;
91- setDropdownWidth ( el . offsetWidth + parseFloat ( style . marginRight ) ) ;
92- } ;
88+ const update = ( ) =>
89+ setDropdownWidth (
90+ el . offsetWidth + parseFloat ( window . getComputedStyle ( el ) . marginRight )
91+ ) ;
9392 update ( ) ;
9493 const ro = new ResizeObserver ( update ) ;
9594 ro . observe ( el ) ;
@@ -101,9 +100,7 @@ export default function MobileWorkflowSteps() {
101100
102101 useEffect ( ( ) => {
103102 const el = stepRefs . current . get ( currentstep ) ;
104- if ( ! el ) {
105- return ;
106- }
103+ if ( ! el ) return ;
107104 el . scrollIntoView ( {
108105 behavior : didMountRef . current ? 'smooth' : 'auto' ,
109106 block : 'nearest' ,
@@ -170,11 +167,8 @@ export default function MobileWorkflowSteps() {
170167 onClick = { handleSelect ( step . id ) }
171168 tabIndex = { 0 }
172169 ref = { ( el ) => {
173- if ( el ) {
174- stepRefs . current . set ( step . id , el ) ;
175- } else {
176- stepRefs . current . delete ( step . id ) ;
177- }
170+ if ( el ) stepRefs . current . set ( step . id , el ) ;
171+ else stepRefs . current . delete ( step . id ) ;
178172 } }
179173 onKeyDown = { ( e ) => {
180174 if ( e . key === 'Enter' || e . key === ' ' ) {
@@ -218,7 +212,7 @@ export default function MobileWorkflowSteps() {
218212 aria-label = { currentTip }
219213 >
220214 { getWfLabel ( currentLabel ) + '\u00A0' }
221- < InfoIcon color = { ' info' } fontSize = "small" />
215+ < InfoIcon color = " info" fontSize = "small" />
222216 </ ButtonBase >
223217 ) : (
224218 getWfLabel ( currentLabel )
0 commit comments