complated

This commit is contained in:
Samandar Turgunboyev
2026-02-17 10:46:57 +05:00
parent 754f11804a
commit d747c72c8d
71 changed files with 917 additions and 397 deletions

View File

@@ -2,6 +2,7 @@ import { useTheme } from '@/components/ThemeContext';
import { Ionicons } from '@expo/vector-icons';
import { LinearGradient } from 'expo-linear-gradient';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { ActivityIndicator, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
type Props = {
@@ -18,7 +19,7 @@ export default function EmptyState({
isRefreshing = false,
}: Props) {
const { isDark } = useTheme();
const { t } = useTranslation();
const theme = {
gradientColors: isDark
? (['#1e293b', '#334155'] as [string, string])
@@ -37,8 +38,8 @@ export default function EmptyState({
<Ionicons name="megaphone-outline" size={64} color={theme.iconColor} />
</LinearGradient>
<Text style={[emptyStyles.title, { color: theme.title }]}>{title}</Text>
<Text style={[emptyStyles.description, { color: theme.description }]}>{description}</Text>
<Text style={[emptyStyles.title, { color: theme.title }]}>{t(title)}</Text>
<Text style={[emptyStyles.description, { color: theme.description }]}>{t(description)}</Text>
{onRefresh && (
<TouchableOpacity
@@ -52,7 +53,9 @@ export default function EmptyState({
) : (
<>
<Ionicons name="refresh" size={20} color={theme.buttonText} />
<Text style={[emptyStyles.refreshText, { color: theme.buttonText }]}>Yangilash</Text>
<Text style={[emptyStyles.refreshText, { color: theme.buttonText }]}>
{t('Yangilash')}
</Text>
</>
)}
</TouchableOpacity>