diff --git a/feature/manage/src/main/java/com/wap/wapp/feature/manage/ManageFragment.kt b/feature/manage/src/main/java/com/wap/wapp/feature/manage/ManageFragment.kt index 4df0fe72..8d2277ce 100644 --- a/feature/manage/src/main/java/com/wap/wapp/feature/manage/ManageFragment.kt +++ b/feature/manage/src/main/java/com/wap/wapp/feature/manage/ManageFragment.kt @@ -4,10 +4,19 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue import androidx.compose.ui.platform.ComposeView import androidx.fragment.app.Fragment import com.wap.designsystem.WappTheme +import com.wap.wapp.core.commmon.extensions.showToast +import com.wap.wapp.core.commmon.extensions.toSupportingText +import com.wap.wapp.feature.manage.code.ManageCodeDialog +import dagger.hilt.android.AndroidEntryPoint +@AndroidEntryPoint class ManageFragment : Fragment() { private lateinit var composeView: ComposeView @@ -25,7 +34,24 @@ class ManageFragment : Fragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) composeView.setContent { - WappTheme {} + var isShowDialog by rememberSaveable { mutableStateOf(false) } + + WappTheme { + ManageScreen( + showManageCodeDialog = { isShowDialog = true }, + ) + + if (isShowDialog) { + ManageCodeDialog( + onDismissRequest = { isShowDialog = false }, + showToast = { throwable -> + requireContext().showToast( + throwable.toSupportingText(), + ) + }, + ) + } + } } } }