Skip to content

Commit faf4ab8

Browse files
committed
chore: remove extra style prop array wrapping
Signed-off-by: Bryce McMath <bryce.j.mcmath@gmail.com>
1 parent 1db6341 commit faf4ab8

File tree

7 files changed

+161
-199
lines changed

7 files changed

+161
-199
lines changed

app/__tests__/screens/__snapshots__/Developer.test.tsx.snap

Lines changed: 80 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,10 @@ exports[`Developer Screen screen renders correctly 1`] = `
3535
<View>
3636
<View
3737
style={
38-
[
39-
{
40-
"backgroundColor": "#313132",
41-
"padding": 24,
42-
},
43-
]
38+
{
39+
"backgroundColor": "#313132",
40+
"padding": 24,
41+
}
4442
}
4543
>
4644
<View
@@ -130,11 +128,9 @@ exports[`Developer Screen screen renders correctly 1`] = `
130128
</View>
131129
<View
132130
style={
133-
[
134-
{
135-
"marginBottom": 10,
136-
},
137-
]
131+
{
132+
"marginBottom": 10,
133+
}
138134
}
139135
/>
140136
<View
@@ -195,12 +191,10 @@ exports[`Developer Screen screen renders correctly 1`] = `
195191
</View>
196192
<View
197193
style={
198-
[
199-
{
200-
"backgroundColor": "#313132",
201-
"padding": 24,
202-
},
203-
]
194+
{
195+
"backgroundColor": "#313132",
196+
"padding": 24,
197+
}
204198
}
205199
>
206200
<View
@@ -285,21 +279,17 @@ exports[`Developer Screen screen renders correctly 1`] = `
285279
</View>
286280
<View
287281
style={
288-
[
289-
{
290-
"marginBottom": 10,
291-
},
292-
]
282+
{
283+
"marginBottom": 10,
284+
}
293285
}
294286
/>
295287
<View
296288
style={
297-
[
298-
{
299-
"backgroundColor": "#313132",
300-
"padding": 24,
301-
},
302-
]
289+
{
290+
"backgroundColor": "#313132",
291+
"padding": 24,
292+
}
303293
}
304294
>
305295
<View
@@ -396,24 +386,20 @@ exports[`Developer Screen screen renders correctly 1`] = `
396386
>
397387
<View
398388
style={
399-
[
400-
{
401-
"borderBottomColor": "#000000",
402-
"borderBottomWidth": 1,
403-
"marginHorizontal": 24,
404-
},
405-
]
389+
{
390+
"borderBottomColor": "#000000",
391+
"borderBottomWidth": 1,
392+
"marginHorizontal": 24,
393+
}
406394
}
407395
/>
408396
</View>
409397
<View
410398
style={
411-
[
412-
{
413-
"backgroundColor": "#313132",
414-
"padding": 24,
415-
},
416-
]
399+
{
400+
"backgroundColor": "#313132",
401+
"padding": 24,
402+
}
417403
}
418404
>
419405
<View
@@ -510,24 +496,20 @@ exports[`Developer Screen screen renders correctly 1`] = `
510496
>
511497
<View
512498
style={
513-
[
514-
{
515-
"borderBottomColor": "#000000",
516-
"borderBottomWidth": 1,
517-
"marginHorizontal": 24,
518-
},
519-
]
499+
{
500+
"borderBottomColor": "#000000",
501+
"borderBottomWidth": 1,
502+
"marginHorizontal": 24,
503+
}
520504
}
521505
/>
522506
</View>
523507
<View
524508
style={
525-
[
526-
{
527-
"backgroundColor": "#313132",
528-
"padding": 24,
529-
},
530-
]
509+
{
510+
"backgroundColor": "#313132",
511+
"padding": 24,
512+
}
531513
}
532514
>
533515
<View
@@ -624,24 +606,20 @@ exports[`Developer Screen screen renders correctly 1`] = `
624606
>
625607
<View
626608
style={
627-
[
628-
{
629-
"borderBottomColor": "#000000",
630-
"borderBottomWidth": 1,
631-
"marginHorizontal": 24,
632-
},
633-
]
609+
{
610+
"borderBottomColor": "#000000",
611+
"borderBottomWidth": 1,
612+
"marginHorizontal": 24,
613+
}
634614
}
635615
/>
636616
</View>
637617
<View
638618
style={
639-
[
640-
{
641-
"backgroundColor": "#313132",
642-
"padding": 24,
643-
},
644-
]
619+
{
620+
"backgroundColor": "#313132",
621+
"padding": 24,
622+
}
645623
}
646624
>
647625
<View
@@ -738,24 +716,20 @@ exports[`Developer Screen screen renders correctly 1`] = `
738716
>
739717
<View
740718
style={
741-
[
742-
{
743-
"borderBottomColor": "#000000",
744-
"borderBottomWidth": 1,
745-
"marginHorizontal": 24,
746-
},
747-
]
719+
{
720+
"borderBottomColor": "#000000",
721+
"borderBottomWidth": 1,
722+
"marginHorizontal": 24,
723+
}
748724
}
749725
/>
750726
</View>
751727
<View
752728
style={
753-
[
754-
{
755-
"backgroundColor": "#313132",
756-
"padding": 24,
757-
},
758-
]
729+
{
730+
"backgroundColor": "#313132",
731+
"padding": 24,
732+
}
759733
}
760734
>
761735
<View
@@ -852,24 +826,20 @@ exports[`Developer Screen screen renders correctly 1`] = `
852826
>
853827
<View
854828
style={
855-
[
856-
{
857-
"borderBottomColor": "#000000",
858-
"borderBottomWidth": 1,
859-
"marginHorizontal": 24,
860-
},
861-
]
829+
{
830+
"borderBottomColor": "#000000",
831+
"borderBottomWidth": 1,
832+
"marginHorizontal": 24,
833+
}
862834
}
863835
/>
864836
</View>
865837
<View
866838
style={
867-
[
868-
{
869-
"backgroundColor": "#313132",
870-
"padding": 24,
871-
},
872-
]
839+
{
840+
"backgroundColor": "#313132",
841+
"padding": 24,
842+
}
873843
}
874844
>
875845
<View
@@ -966,24 +936,20 @@ exports[`Developer Screen screen renders correctly 1`] = `
966936
>
967937
<View
968938
style={
969-
[
970-
{
971-
"borderBottomColor": "#000000",
972-
"borderBottomWidth": 1,
973-
"marginHorizontal": 24,
974-
},
975-
]
939+
{
940+
"borderBottomColor": "#000000",
941+
"borderBottomWidth": 1,
942+
"marginHorizontal": 24,
943+
}
976944
}
977945
/>
978946
</View>
979947
<View
980948
style={
981-
[
982-
{
983-
"backgroundColor": "#313132",
984-
"padding": 24,
985-
},
986-
]
949+
{
950+
"backgroundColor": "#313132",
951+
"padding": 24,
952+
}
987953
}
988954
>
989955
<View
@@ -1074,12 +1040,10 @@ exports[`Developer Screen screen renders correctly 1`] = `
10741040
</View>
10751041
<View
10761042
style={
1077-
[
1078-
{
1079-
"backgroundColor": "#313132",
1080-
"padding": 24,
1081-
},
1082-
]
1043+
{
1044+
"backgroundColor": "#313132",
1045+
"padding": 24,
1046+
}
10831047
}
10841048
>
10851049
<View
@@ -1170,12 +1134,10 @@ exports[`Developer Screen screen renders correctly 1`] = `
11701134
</View>
11711135
<View
11721136
style={
1173-
[
1174-
{
1175-
"backgroundColor": "#313132",
1176-
"padding": 24,
1177-
},
1178-
]
1137+
{
1138+
"backgroundColor": "#313132",
1139+
"padding": 24,
1140+
}
11791141
}
11801142
>
11811143
<View

app/src/components/LoadingIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default function LoadingIcon({ size, color, active }: Readonly<LoadingIco
3333

3434
return (
3535
<>
36-
<Animated.View style={[{ transform: [{ rotate: rotation }] }]}>
36+
<Animated.View style={{ transform: [{ rotate: rotation }] }}>
3737
<Icon style={{ color }} size={size} name="refresh" />
3838
</Animated.View>
3939
</>

app/src/screens/Developer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const Settings: React.FC = () => {
111111
subContent,
112112
}: SectionRowProps) => (
113113
<>
114-
<View style={[styles.section]}>
114+
<View style={styles.section}>
115115
<View style={{ flexDirection: 'row' }}>
116116
<Text style={styles.rowTitle}>{title}</Text>
117117
<Pressable
@@ -128,7 +128,7 @@ const Settings: React.FC = () => {
128128
</View>
129129
{showRowSeparator && (
130130
<View style={{ backgroundColor: SettingsTheme.groupBackground }}>
131-
<View style={[styles.rowSeparator]}></View>
131+
<View style={styles.rowSeparator}></View>
132132
</View>
133133
)}
134134
</>
@@ -296,7 +296,7 @@ const Settings: React.FC = () => {
296296
value={devMode}
297297
/>
298298
</SectionRow>
299-
<View style={[styles.sectionSeparator]}></View>
299+
<View style={styles.sectionSeparator}></View>
300300
<SectionHeader icon={'apartment'} title={'IAS'} />
301301
<SectionRow
302302
title={t('Developer.Environment')}
@@ -310,7 +310,7 @@ const Settings: React.FC = () => {
310310
{store.developer.environment.name}
311311
</Text>
312312
</SectionRow>
313-
<View style={[styles.sectionSeparator]}></View>
313+
<View style={styles.sectionSeparator}></View>
314314
<SectionRow
315315
title={t('Verifier.UseVerifierCapability')}
316316
accessibilityLabel={t('Verifier.Toggle')}

app/src/screens/IASEnvironment.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ const IASEnvironmentScreen: React.FC<IASEnvironmentProps> = ({ shouldDismissModa
5151
}
5252

5353
return (
54-
<SafeAreaView style={[styles.container]}>
54+
<SafeAreaView style={styles.container}>
5555
<FlatList
5656
data={environments}
5757
renderItem={({ item: environment }) => {
5858
const { name }: IASEnvironment = environment
5959
return (
6060
<View style={[styles.section, styles.sectionRow]}>
61-
<Text style={[TextTheme.title]}>{t(`Developer.${name}`)}</Text>
61+
<Text style={TextTheme.title}>{t(`Developer.${name}`)}</Text>
6262
<BouncyCheckbox
6363
accessibilityLabel={name}
6464
disableText
@@ -79,7 +79,7 @@ const IASEnvironmentScreen: React.FC<IASEnvironmentProps> = ({ shouldDismissModa
7979
}}
8080
ItemSeparatorComponent={() => (
8181
<View style={{ backgroundColor: SettingsTheme.groupBackground }}>
82-
<View style={[styles.itemSeparator]}></View>
82+
<View style={styles.itemSeparator}></View>
8383
</View>
8484
)}
8585
/>

0 commit comments

Comments
 (0)