|
|
@@ -0,0 +1,33 @@
|
|
|
+package com.sirekanian.spacetime.ui
|
|
|
+
|
|
|
+import androidx.compose.foundation.layout.Arrangement
|
|
|
+import androidx.compose.foundation.layout.Column
|
|
|
+import androidx.compose.foundation.layout.fillMaxSize
|
|
|
+import androidx.compose.foundation.layout.fillMaxWidth
|
|
|
+import androidx.compose.foundation.layout.padding
|
|
|
+import androidx.compose.foundation.layout.systemBarsPadding
|
|
|
+import androidx.compose.material.Button
|
|
|
+import androidx.compose.material.Text
|
|
|
+import androidx.compose.runtime.Composable
|
|
|
+import androidx.compose.ui.Alignment
|
|
|
+import androidx.compose.ui.Modifier
|
|
|
+import androidx.compose.ui.text.style.TextAlign
|
|
|
+import androidx.compose.ui.unit.dp
|
|
|
+
|
|
|
+@Composable
|
|
|
+fun GalleryErrorContent(onRetry: () -> Unit) {
|
|
|
+ Column(
|
|
|
+ modifier = Modifier.fillMaxSize().systemBarsPadding().padding(16.dp),
|
|
|
+ verticalArrangement = Arrangement.spacedBy(12.dp, Alignment.CenterVertically),
|
|
|
+ horizontalAlignment = Alignment.CenterHorizontally,
|
|
|
+ ) {
|
|
|
+ Text(
|
|
|
+ text = "Check your network connection",
|
|
|
+ modifier = Modifier.fillMaxWidth(),
|
|
|
+ textAlign = TextAlign.Center,
|
|
|
+ )
|
|
|
+ Button(onClick = onRetry) {
|
|
|
+ Text(text = "Try again")
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|