diff --git a/feature/profile/src/main/java/com/wap/wapp/feature/profile/ProfileScreen.kt b/feature/profile/src/main/java/com/wap/wapp/feature/profile/ProfileScreen.kt index 66a9bac0..52b1eca9 100644 --- a/feature/profile/src/main/java/com/wap/wapp/feature/profile/ProfileScreen.kt +++ b/feature/profile/src/main/java/com/wap/wapp/feature/profile/ProfileScreen.kt @@ -1,26 +1,17 @@ package com.wap.wapp.feature.profile -import androidx.compose.foundation.Image import androidx.compose.foundation.background -import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue -import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Brush -import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource -import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.sp import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.wap.designsystem.WappTheme +import com.wap.designsystem.component.WappMainTopBar import com.wap.wapp.core.designresource.R.drawable import com.wap.wapp.core.designresource.R.string import com.wap.wapp.feature.profile.component.WappProfileCard @@ -55,32 +46,13 @@ internal fun ProfileScreen( .fillMaxSize() .background(WappTheme.colors.backgroundBlack), ) { - Box( - modifier = Modifier - .fillMaxWidth() - .padding(top = 25.dp), - ) { - Text( - text = stringResource(id = string.profile), - style = WappTheme.typography.titleBold.copy(fontSize = 20.sp), - color = WappTheme.colors.white, - modifier = Modifier - .align(Alignment.CenterStart) - .padding(start = 25.dp), - ) - - if (role != Role.GUEST) { - Image( - painter = - painterResource(id = drawable.ic_subtract), - contentDescription = stringResource(id = R.string.profile_setting_description), - modifier = Modifier - .align(Alignment.CenterEnd) - .padding(end = 20.dp) - .clickable { navigateToProfileSetting() }, - ) - } - } + WappMainTopBar( + titleRes = string.profile, + contentRes = R.string.profile_content, + settingButtonDescriptionRes = R.string.profile_setting_description, + showSettingButton = role != Role.GUEST, + onClickSettingButton = navigateToProfileSetting, + ) when (role) { Role.MANAGER -> {