Add error handling and notes page.

This commit is contained in:
Patrick Fic
2025-10-15 15:46:28 -07:00
parent 8d60d9776c
commit 934e832b51
11 changed files with 329 additions and 94 deletions

View File

@@ -1,9 +1,20 @@
import { Text, View } from "react-native";
import { useTranslation } from "react-i18next";
import { Text } from "react-native";
import { Card } from "react-native-paper";
export default function ErrorDisplay({ errorMessage }) {
export default function ErrorDisplay({ errorMessage, error }) {
const { t } = useTranslation();
return (
<View style={{ backgroundColor: "red" }}>
<Text>{errorMessage}</Text>
</View>
<Card style={{ margin: 8, backgroundColor: "#ffdddd" }}>
<Card.Title title={t("general.labels.error")} titleVariant="titleLarge" />
<Card.Content>
<Text>
{errorMessage ||
error?.message ||
error ||
"An unknown error has occured."}
</Text>
</Card.Content>
</Card>
);
}