aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile/components/FullPageError.tsx
blob: 57fd62ed61924ed712cca0e4534fbf00dd367bbe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { Text, View } from "react-native";

import { Button } from "./ui/Button";

export default function FullPageError({
  error,
  onRetry,
}: {
  error: string;
  onRetry: () => void;
}) {
  return (
    <View className="size-full items-center justify-center">
      <View className="h-1/4 items-center justify-between rounded-lg border border-gray-500 border-transparent bg-background px-10 py-4">
        <Text className="text-bold text-3xl text-foreground">
          Something Went Wrong
        </Text>
        <Text className="text-foreground"> {error}</Text>
        <Button onPress={() => onRetry()} label="Retry" />
      </View>
    </View>
  );
}