register address

This commit is contained in:
Samandar Turgunboyev
2026-03-26 14:23:58 +05:00
parent fee9213c59
commit a671706fb3
12 changed files with 555 additions and 311 deletions

View File

@@ -98,31 +98,7 @@ export function NotificationTab() {
contentContainerStyle={styles.listContent}
showsVerticalScrollIndicator={false}
ListHeaderComponent={() => {
if (notifications.length === 0) {
return (
<View style={styles.emptyHeader}>
<Text
style={[
styles.emptyTitle,
{ color: isDark ? '#f1f5f9' : '#0f172a' },
]}
>
{t("Hozircha bildirishnomalar yo'q")}
</Text>
<Text
style={[
styles.emptyDesc,
{ color: isDark ? '#94a3b8' : '#64748b' },
]}
>
{t("Yangi xabarlar shu yerda paydo boladi")}
</Text>
</View>
);
}
if (notifications.some((n) => !n.is_read)) {
if (notifications.length > 0 && notifications.some((n) => !n.is_read)) {
return (
<View style={styles.headerActions}>
<TouchableOpacity
@@ -150,14 +126,16 @@ export function NotificationTab() {
return (
<View style={styles.allReadContainer}>
<Text
style={[
styles.allReadText,
{ color: isDark ? '#94a3b8' : '#64748b' },
]}
>
{t("Barcha bildirishnomalar oqilgan")}
</Text>
{notifications.length > 0 && (
<Text
style={[
styles.allReadText,
{ color: isDark ? '#94a3b8' : '#64748b' },
]}
>
{t("Barcha bildirishnomalar oqilgan")}
</Text>
)}
</View>
);
}}