@@ -12,7 +12,7 @@ const CARD_COLORS = ['#D6A8D4', '#94B6BB', '#FBB6B1', '#FF33D1', '#33D1FF'];
12
12
const HomeView = ( ) => {
13
13
const {
14
14
user : { firstName, optedCourse } ,
15
- } = useActiveUser ( )
15
+ } = useActiveUser ( ) ;
16
16
const router = useRouter ( ) ;
17
17
18
18
useEffect ( ( ) => {
@@ -36,43 +36,55 @@ const HomeView = () => {
36
36
37
37
return (
38
38
< Box flex = { 1 } width = "$full" >
39
- < Text fontSize = "$xl" color = "black" fontWeight = "$bold" ml = "$5" py = "$5" >
40
- Hello { firstName } !
41
- </ Text >
42
- < Box bg = "white" p = "$1.5" >
43
- < Image
44
- borderRadius = { 10 }
45
- style = { {
46
- resizeMode : 'contain' ,
47
- width : imageWidth ,
48
- height : imageHeight ,
49
- } }
50
- alt = "homepageBanner"
51
- source = { HomePageBanner }
52
- />
53
- </ Box >
54
- < Text fontSize = "$xl" color = "black" fontWeight = "$medium" ml = "$5" py = "$5" >
55
- Choose your stage
56
- </ Text >
57
- < Box
58
- display = "flex"
59
- flexDirection = "row"
60
- justifyContent = "space-evenly"
61
- alignItems = "center"
62
- borderRadius = "$2xl"
63
- >
64
- { optedCourse . stages . map ( ( stage , index ) => (
65
- < View
66
- borderRadius = "$lg"
67
- key = { stage . id }
68
- style = { { backgroundColor : CARD_COLORS [ index % CARD_COLORS . length ] } }
69
- >
70
- < StageCard
71
- stage = { stage . title }
72
- href = { `/course-stages/${ stage . id } ` }
73
- />
74
- </ View >
75
- ) ) }
39
+ < Box $lg-pb = "$96" >
40
+ < Text fontSize = "$xl" color = "black" fontWeight = "$bold" ml = "$5" py = "$5" >
41
+ Hello { firstName } !
42
+ </ Text >
43
+ < Box bg = "white" p = "$1.5" maxHeight = { dimensions . height / 1.5 } >
44
+ < Image
45
+ borderRadius = { 10 }
46
+ maxHeight = "$full"
47
+ resizeMode = "cover"
48
+ $md-resizeMode = "cover"
49
+ style = { {
50
+ width : imageWidth ,
51
+ height : imageHeight ,
52
+ } }
53
+ alt = "homepageBanner"
54
+ source = { HomePageBanner }
55
+ />
56
+ </ Box >
57
+ < Text fontSize = "$xl" color = "black" fontWeight = "$medium" ml = "$5" py = "$5" >
58
+ Choose your stage
59
+ </ Text >
60
+ < Box
61
+ display = "flex"
62
+ gap = "$2"
63
+ flexDirection = "row"
64
+ justifyContent = "space-evenly"
65
+ alignItems = "center"
66
+ borderRadius = "$2xl"
67
+ >
68
+ { optedCourse . stages . map ( ( stage , index ) => (
69
+ < View
70
+ borderRadius = "$lg"
71
+ minHeight = { dimensions . height - dimensions . height * 0.85 }
72
+ width = "$1/3"
73
+ key = { stage . id }
74
+ display = "flex"
75
+ justifyContent = "center"
76
+ alignItems = "center"
77
+ style = { {
78
+ backgroundColor : CARD_COLORS [ index % CARD_COLORS . length ] ,
79
+ } }
80
+ >
81
+ < StageCard
82
+ stage = { stage . title }
83
+ href = { `/course-stages/${ stage . id } ` }
84
+ />
85
+ </ View >
86
+ ) ) }
87
+ </ Box >
76
88
</ Box >
77
89
< FooterView />
78
90
</ Box >
0 commit comments