@@ -17,9 +17,6 @@ import androidx.compose.material3.ExperimentalMaterial3Api
17
17
import androidx.compose.material3.Icon
18
18
import androidx.compose.material3.Scaffold
19
19
import androidx.compose.material3.Text
20
- import androidx.compose.material3.TopAppBar
21
- import androidx.compose.material3.TopAppBarColors
22
- import androidx.compose.material3.TopAppBarDefaults
23
20
import androidx.compose.runtime.Composable
24
21
import androidx.compose.ui.Alignment
25
22
import androidx.compose.ui.Modifier
@@ -30,6 +27,7 @@ import androidx.compose.ui.res.stringResource
30
27
import androidx.compose.ui.res.vectorResource
31
28
import androidx.compose.ui.tooling.preview.Preview
32
29
import androidx.compose.ui.unit.dp
30
+ import androidx.hilt.navigation.compose.hiltViewModel
33
31
import com.everymeal.presentation.R
34
32
import com.everymeal.presentation.ui.theme.EveryMealTypography
35
33
import com.everymeal.presentation.ui.theme.Gray100
@@ -40,10 +38,10 @@ import com.everymeal.presentation.ui.theme.Gray800
40
38
import com.everymeal.presentation.ui.theme.Gray900
41
39
42
40
43
- @OptIn(ExperimentalMaterial3Api ::class )
44
41
@Composable
45
42
fun MyPageScreen (
46
-
43
+ viewModel : MyPageViewModel = hiltViewModel(),
44
+ withDrawClick : () -> Unit = {}
47
45
) {
48
46
Scaffold { innerPadding ->
49
47
LazyColumn (
@@ -63,7 +61,9 @@ fun MyPageScreen(
63
61
}
64
62
65
63
item(key = " My Activities" ) {
66
- MyActivities (Modifier .padding(horizontal = 20 .dp))
64
+ MyActivities (Modifier .padding(horizontal = 20 .dp)) {
65
+
66
+ }
67
67
Spacer (modifier = Modifier .padding(24 .dp))
68
68
Divider (
69
69
color = Gray100 ,
@@ -73,7 +73,25 @@ fun MyPageScreen(
73
73
}
74
74
75
75
item(key = " My Settings" ) {
76
- MySettings (Modifier .padding(horizontal = 20 .dp))
76
+ MySettings (Modifier .padding(horizontal = 20 .dp)) {
77
+ when (it) {
78
+ MyPageSetting .INQUIRY .type -> {
79
+ // TODO
80
+ }
81
+ MyPageSetting .SERVICE_TERMS .type -> {
82
+ // TODO
83
+ }
84
+ MyPageSetting .OPEN_SOURCE_LICENSE .type -> {
85
+ // TODO
86
+ }
87
+ MyPageSetting .VERSION_INFO .type -> {
88
+ // TODO
89
+ }
90
+ MyPageSetting .WITHDRAWAL .type -> {
91
+ withDrawClick()
92
+ }
93
+ }
94
+ }
77
95
Spacer (modifier = Modifier .padding(24 .dp))
78
96
}
79
97
}
@@ -139,7 +157,8 @@ fun MyInformation(
139
157
140
158
@Composable
141
159
fun MyActivities (
142
- modifier : Modifier = Modifier
160
+ modifier : Modifier = Modifier ,
161
+ onClick : (String ) -> Unit
143
162
) {
144
163
Column (
145
164
modifier = modifier
@@ -166,7 +185,8 @@ fun MyActivities(
166
185
167
186
@Composable
168
187
fun MySettings (
169
- modifier : Modifier = Modifier
188
+ modifier : Modifier = Modifier ,
189
+ onClick : (String ) -> Unit
170
190
) {
171
191
Column (
172
192
modifier = modifier
@@ -177,25 +197,25 @@ fun MySettings(
177
197
color = Gray900
178
198
)
179
199
MyTabMenu (
180
- menuTitle = " 문의하기 " ,
181
- onClick = { }
200
+ menuTitle = MyPageSetting . INQUIRY .type ,
201
+ onClick = { onClick( MyPageSetting . INQUIRY .type) }
182
202
)
183
203
MyTabMenu (
184
- menuTitle = " 서비스 약관 " ,
185
- onClick = { }
204
+ menuTitle = MyPageSetting . SERVICE_TERMS .type ,
205
+ onClick = { onClick( MyPageSetting . SERVICE_TERMS .type) }
186
206
)
187
207
MyTabMenu (
188
- menuTitle = " 오픈소스 라이센스 " ,
189
- onClick = { }
208
+ menuTitle = MyPageSetting . OPEN_SOURCE_LICENSE .type ,
209
+ onClick = { onClick( MyPageSetting . OPEN_SOURCE_LICENSE .type) }
190
210
)
191
211
MyTabMenu (
192
- menuTitle = " 버전 정보 " ,
212
+ menuTitle = MyPageSetting . VERSION_INFO .type ,
193
213
isAppVersion = true ,
194
- onClick = { }
214
+ onClick = { onClick( MyPageSetting . VERSION_INFO .type) }
195
215
)
196
216
MyTabMenu (
197
- menuTitle = " 탈퇴하기 " ,
198
- onClick = { }
217
+ menuTitle = MyPageSetting . WITHDRAWAL .type ,
218
+ onClick = { onClick( MyPageSetting . WITHDRAWAL .type) }
199
219
)
200
220
}
201
221
}
0 commit comments