bye Connectivity.kt
This commit is contained in:
@@ -1,41 +0,0 @@
|
|||||||
package `in`.sminnovations.attendanceapp.screens.home.ui.componets
|
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.padding
|
|
||||||
import androidx.compose.material3.AlertDialog
|
|
||||||
import androidx.compose.material3.Button
|
|
||||||
import androidx.compose.material3.Text
|
|
||||||
import androidx.compose.runtime.Composable
|
|
||||||
import androidx.compose.ui.Modifier
|
|
||||||
import androidx.compose.ui.unit.dp
|
|
||||||
|
|
||||||
|
|
||||||
@Composable
|
|
||||||
fun NetworkErrorDialog(
|
|
||||||
showDialog: Boolean,
|
|
||||||
onRetry: () -> Unit
|
|
||||||
) {
|
|
||||||
if (showDialog) {
|
|
||||||
AlertDialog(
|
|
||||||
onDismissRequest = { /* Do nothing to prevent dismissal by tapping outside */ },
|
|
||||||
title = {
|
|
||||||
Text(text = "Network Error")
|
|
||||||
},
|
|
||||||
text = {
|
|
||||||
Text(text = "Network is not connected. Please check your Wi-Fi or mobile data.\n\nIf Wi-Fi is just connected wait for some time and press retry again")
|
|
||||||
},
|
|
||||||
confirmButton = {
|
|
||||||
Button(
|
|
||||||
onClick = {
|
|
||||||
onRetry()
|
|
||||||
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
Text("Retry")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
modifier = Modifier.padding(16.dp)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user