From a2854fcefc9f55175befbb5deda11d08f9406ac4 Mon Sep 17 00:00:00 2001 From: tgyuu-An Date: Sat, 17 Feb 2024 15:43:46 +0900 Subject: [PATCH] =?UTF-8?q?[CHORE]=20#125=20:=20=EC=B6=9C=EC=84=9D=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=9D=B4=EB=8F=99=20=ED=9B=84=20?= =?UTF-8?q?=EB=8B=A4=EB=A5=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99=ED=95=98=EB=A9=B4=20=ED=99=94=EB=A9=B4=EC=9D=B4=20?= =?UTF-8?q?=EC=A2=8C=EC=B8=A1=20=EC=83=81=EB=8B=A8=20=EB=B6=80=ED=84=B0=20?= =?UTF-8?q?=ED=8E=BC=EC=B3=90=EC=A7=80=EB=8A=94=20=EB=B2=84=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feature/attendance/AttendanceScreen.kt | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/feature/attendance/src/main/java/com/wap/wapp/feature/attendance/AttendanceScreen.kt b/feature/attendance/src/main/java/com/wap/wapp/feature/attendance/AttendanceScreen.kt index af5567c8..9bb72e6c 100644 --- a/feature/attendance/src/main/java/com/wap/wapp/feature/attendance/AttendanceScreen.kt +++ b/feature/attendance/src/main/java/com/wap/wapp/feature/attendance/AttendanceScreen.kt @@ -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, + ) + } } } }