auth to server-V17
This commit is contained in:
parent
f57c7f82fd
commit
8926c2d62c
1 changed files with 4 additions and 7 deletions
|
|
@ -54,7 +54,8 @@ import kotlin.text.ifEmpty
|
||||||
@Composable
|
@Composable
|
||||||
fun Register_Screen(
|
fun Register_Screen(
|
||||||
paddingValues: PaddingValues,
|
paddingValues: PaddingValues,
|
||||||
viewModel: RegisterViewModel = hiltViewModel()
|
viewModel: RegisterViewModel = hiltViewModel(),
|
||||||
|
onRegisterSuccess: () -> Unit
|
||||||
){
|
){
|
||||||
val uiState by viewModel.uiState.collectAsState()
|
val uiState by viewModel.uiState.collectAsState()
|
||||||
|
|
||||||
|
|
@ -296,20 +297,16 @@ fun Register_Screen(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//註冊成功後到login
|
||||||
LaunchedEffect(uiState.isSuccess) {
|
LaunchedEffect(uiState.isSuccess) {
|
||||||
if (uiState.isSuccess) {
|
if (uiState.isSuccess) {
|
||||||
// 這裡執行導向登入頁面或是主頁面的動作
|
onRegisterSuccess()
|
||||||
println("導航至登入頁面")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//input_block_end
|
//input_block_end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue