@@ -5,7 +5,6 @@ import { translate } from "../../i18n"
5
5
import { colors , spacing } from "../../theme"
6
6
import { Speaker } from "../../services/api/webflow-api.types"
7
7
import { SocialButtons } from "../../components/SocialButton"
8
-
9
8
export interface AssistantsListProp {
10
9
assistants : Speaker [ ]
11
10
}
@@ -16,59 +15,54 @@ export function AssistantsList(props: AssistantsListProp) {
16
15
if ( ! assistants ) return null
17
16
18
17
return (
19
- < >
18
+ < View style = { $assistantRoot } >
19
+ < Text
20
+ preset = "listHeading"
21
+ text = { translate ( "talkDetailsScreen.assistingTheWorkshop" ) }
22
+ style = { $assistantHeading }
23
+ />
20
24
< View style = { $assistantContainer } >
21
- < Text
22
- preset = "listHeading"
23
- text = { translate ( "talkDetailsScreen.assistingTheWorkshop" ) }
24
- style = { $assistantHeading }
25
- />
26
- < View
27
- style = { assistants . length < 2 ? $assistantsContainerWithOne : $assistantsContainerWithMore }
28
- >
29
- { assistants . map ( ( assistant ) => (
30
- < View style = { $assistant } key = { assistant . _id } >
31
- < AutoImage source = { { uri : assistant [ "speaker-photo" ] . url } } style = { $assistantImage } />
32
- < Text preset = "companionHeading" text = { assistant . name } />
33
- < Text preset = "label" style = { $assistantCompany } text = { assistant . company } />
34
- < View style = { $assistantLinks } >
35
- < SocialButtons
36
- socialButtons = { [
37
- { icon : "twitter" , url : assistant . twitter } ,
38
- { icon : "github" , url : assistant . github } ,
39
- { icon : "link" , url : assistant . externalURL } ,
40
- ] }
41
- />
42
- </ View >
25
+ { assistants . map ( ( assistant ) => (
26
+ < View style = { $assistant } key = { assistant . _id } >
27
+ < AutoImage source = { { uri : assistant [ "speaker-photo" ] . url } } style = { $assistantImage } />
28
+ < Text preset = "companionHeading" text = { assistant . name } />
29
+ < Text preset = "label" style = { $assistantCompany } text = { assistant . company } />
30
+ < View style = { $assistantLinks } >
31
+ < SocialButtons
32
+ socialButtons = { [
33
+ { icon : "twitter" , url : assistant . twitter } ,
34
+ { icon : "github" , url : assistant . github } ,
35
+ { icon : "link" , url : assistant . externalURL } ,
36
+ ] }
37
+ />
43
38
</ View >
44
- ) ) }
45
- </ View >
39
+ </ View >
40
+ ) ) }
46
41
</ View >
47
- </ >
42
+ </ View >
48
43
)
49
44
}
50
45
51
- const $assistantsContainerWithOne : ViewStyle = {
52
- flexDirection : "row" ,
53
- marginStart : spacing . large ,
54
- }
55
-
56
- const $assistantsContainerWithMore : ViewStyle = {
46
+ const $assistantContainer : ViewStyle = {
57
47
flexDirection : "row" ,
58
- justifyContent : "space-around" ,
48
+ flexWrap : "wrap" ,
49
+ justifyContent : "space-between" ,
59
50
}
60
51
61
- const $assistantContainer : ViewStyle = {
52
+ const $assistantRoot : ViewStyle = {
62
53
marginTop : spacing . large ,
63
54
marginBottom : spacing . huge ,
64
55
}
65
56
66
57
const $assistant : ViewStyle = {
67
58
alignItems : "center" ,
59
+ marginTop : spacing . large ,
60
+ width : "48%" ,
61
+ justifyContent : "center" ,
68
62
}
69
63
70
64
const $assistantHeading : TextStyle = {
71
- marginVertical : spacing . large ,
65
+ marginTop : spacing . large ,
72
66
}
73
67
74
68
const $assistantImage : ImageStyle = {
0 commit comments