Skip to content

Commit

Permalink
[FEATURE] #82 : Profile TopBar 장착
Browse files Browse the repository at this point in the history
  • Loading branch information
tgyuuAn committed Jan 6, 2024
1 parent 026a518 commit 2767c27
Showing 1 changed file with 8 additions and 36 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 -> {
Expand Down

0 comments on commit 2767c27

Please sign in to comment.