diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/my/MyScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/my/MyScreen.kt index 8eba0706..c3ba4ba9 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/my/MyScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/my/MyScreen.kt @@ -1,5 +1,6 @@ package com.nexters.boolti.presentation.screen.my +import android.widget.Toast import androidx.annotation.DrawableRes import androidx.compose.foundation.background import androidx.compose.foundation.clickable @@ -26,6 +27,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalUriHandler import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.vectorResource @@ -60,7 +62,11 @@ fun MyScreen( onClickQrScan: () -> Unit, ) { val user by viewModel.user.collectAsStateWithLifecycle() + + val domain = BuildConfig.DOMAIN + val url = "https://${domain}/show/add" val uriHandler = LocalUriHandler.current + val context = LocalContext.current LaunchedEffect(Unit) { viewModel.fetchMyInfo() @@ -72,7 +78,10 @@ fun MyScreen( onClickHeaderButton = if (user != null) navigateToProfile else requireLogin, onClickAccountSetting = if (user != null) onClickAccountSetting else requireLogin, onClickReservations = if (user != null) navigateToReservations else requireLogin, - onClickRegisterShow = navigateToShowRegistration, + onClickRegisterShow = { + uriHandler.openUri(url) + Toast.makeText(context, "공연 등록을 위해 웹으로 이동합니다", Toast.LENGTH_LONG).show() + },// navigateToShowRegistration, // TODO 추후 인앱 공연 등록 반영 시 주석 해제 onClickQrScan = if (user != null) onClickQrScan else requireLogin, ) } diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/showregistration/ShowRegistrationScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/showregistration/ShowRegistrationScreen.kt index 5606de53..ceb1e361 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/showregistration/ShowRegistrationScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/showregistration/ShowRegistrationScreen.kt @@ -61,7 +61,7 @@ fun ShowRegistrationScreen( val domain = BuildConfig.DOMAIN val url = "https://${domain}/show/add" - var showExitDialog by mutableStateOf(false) + var showExitDialog by remember { mutableStateOf(false) } val scope = rememberCoroutineScope() var webView: WebView? by remember { mutableStateOf(null) }