import Text from '@/components/Text'; import Styles from '@/constants/Styles'; import { useTheme } from '@/providers/ThemeProvider'; import { MaterialCommunityIcons } from "@expo/vector-icons"; import React from 'react'; import { View } from 'react-native'; interface ErrorViewProps { title?: string; message?: string; icon?: keyof typeof MaterialCommunityIcons.glyphMap; } /** * ErrorView component to display error or empty states. * Used when data is not found, deleted, or an error occurs during fetching. */ export default function ErrorView({ title = "Terjadi Kesalahan", message = "Data tidak ditemukan atau sudah dihapus.", icon = "alert-circle-outline" }: ErrorViewProps) { const { colors } = useTheme(); return ( {title} {message} ); }