Skip to content

Commit

Permalink
[CHORE] #125 : 출석 페이지 이동 후 다른 페이지 이동하면 화면이 좌측 상단 부터 펼쳐지는 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
tgyuuAn committed Feb 17, 2024
1 parent 7ef9aac commit a2854fc
Showing 1 changed file with 21 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,24 +83,27 @@ internal fun AttendanceRoute(
}
}

when (userRoleState) {
is UserRoleState.Loading -> CircleLoader(modifier = Modifier.fillMaxSize())
is UserRoleState.Success -> {
when ((userRoleState as UserRoleState.Success).userRole) {
UserRole.GUEST -> AttendanceGuestScreen(onButtonClicked = navigateToSignIn)
UserRole.MANAGER, UserRole.MEMBER -> AttendanceScreen(
userRole = (userRoleState as UserRoleState.Success).userRole,
snackBarHostState = snackBarHostState,
eventsAttendanceStatusState = eventsAttendanceStatusState,
attendanceCode = attendanceCode,
selectedEventTitle = selectedEventTitle,
clearAttendanceCode = viewModel::clearAttendanceCode,
onAttendanceCodeChanged = viewModel::setAttendanceCode,
onSelectEventId = viewModel::setSelectedEventId,
onSelectEventTitle = viewModel::setSelectedEventTitle,
verifyAttendanceCode = viewModel::verifyAttendanceCode,
navigateToAttendanceManagement = navigateToAttendanceManagement,
)
Column(modifier = Modifier.fillMaxSize()) {
when (userRoleState) {
is UserRoleState.Loading -> CircleLoader(modifier = Modifier.fillMaxSize())
is UserRoleState.Success -> {
when ((userRoleState as UserRoleState.Success).userRole) {
UserRole.GUEST -> AttendanceGuestScreen(onButtonClicked = navigateToSignIn)
UserRole.MANAGER, UserRole.MEMBER ->
AttendanceScreen(
userRole = (userRoleState as UserRoleState.Success).userRole,
snackBarHostState = snackBarHostState,
eventsAttendanceStatusState = eventsAttendanceStatusState,
attendanceCode = attendanceCode,
selectedEventTitle = selectedEventTitle,
clearAttendanceCode = viewModel::clearAttendanceCode,
onAttendanceCodeChanged = viewModel::setAttendanceCode,
onSelectEventId = viewModel::setSelectedEventId,
onSelectEventTitle = viewModel::setSelectedEventTitle,
verifyAttendanceCode = viewModel::verifyAttendanceCode,
navigateToAttendanceManagement = navigateToAttendanceManagement,
)
}
}
}
}
Expand Down

0 comments on commit a2854fc

Please sign in to comment.