aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile/components/FullPageError.tsx
blob: f340d052b5c26baea7c01463ddb9db8703130bfa (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
24
25
26
import { View } from "react-native";
import { Text } from "@/components/ui/Text";

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}>
          <Text>Retry</Text>
        </Button>
      </View>
    </View>
  );
}