Унифицированы экраны, требующие авторизации, в гостевом режиме

This commit is contained in:
mi
2026-07-30 19:47:10 +03:00
parent e24ed9d8ef
commit 1a420eeaf0
7 changed files with 124 additions and 69 deletions
@@ -5,7 +5,7 @@ import React, { useState } from "react";
import { Pressable, ScrollView, StyleSheet, Text, View } from "react-native";
import { useApp } from "../src/app-context";
import { AccordionSection } from "../src/components/AccordionSection";
import { AppHeader } from "../src/components/AppHeader";
import { GuestAuthGate } from "../src/components/GuestAuthGate";
import { ScreenShell } from "../src/components/ScreenShell";
import { isProduction } from "../src/config";
import { profileApi } from "../src/services";
@@ -30,12 +30,17 @@ export default function ProfileScreen() {
if (!enabled) {
return (
<ScreenShell>
<AppHeader guestLabel="Гость" />
<View style={{ flex: 1, padding: spacing.lg, justifyContent: "center", gap: spacing.md }}>
<View style={stylesLocal.topBar}>
<Pressable accessibilityRole="button" accessibilityLabel="Назад" onPress={() => router.back()} style={({ pressed }) => [stylesLocal.backButton, pressed && stylesLocal.pressed]}>
<Feather name="arrow-left" size={20} color={colors.foreground} />
</Pressable>
<Text accessibilityRole="header" style={styles.title}>Профиль</Text>
<Text style={styles.text}>Профиль доступен после авторизации.</Text>
<Link href="/" style={styles.link}>Перейти на главную для входа</Link>
</View>
<GuestAuthGate
icon="user"
title="Профиль доступен после входа"
description="Авторизуйтесь, чтобы видеть личные данные и документы компании."
/>
</ScreenShell>
);
}