Added znzt web app
Deploy Manager App / deploy (push) Successful in 17s Details

This commit is contained in:
romanskijdev 2026-08-25 13:07:51 +03:00
parent cf0e2cc3df
commit d74493215d
1 changed files with 30 additions and 4 deletions

View File

@ -9,7 +9,7 @@ export function App() {
const handleLogout = () => {
localStorage.clear();
sessionStorage.clear();
window.location.reload(); // Перезагрузка вернет пользователя на экран входа
window.location.href = '/';
};
useEffect(() => {
@ -48,9 +48,35 @@ export function App() {
}
return (
<div>
{/* Ваше основное приложение */}
<h1>Панель менеджера</h1>
<div className="relative min-h-screen bg-gray-100">
{/* Всегда доступная кнопка выхода в правом верхнем углу */}
<div className="absolute top-4 right-4 z-50">
<button
onClick={handleLogout}
className="bg-red-600 hover:bg-red-700 text-white text-sm font-medium py-2 px-4 rounded-lg shadow transition-colors cursor-pointer"
>
🚪 Выйти из аккаунта
</button>
</div>
{authError ? (
<div className="flex flex-col items-center justify-center min-h-screen p-4">
<div className="max-w-md w-full bg-white rounded-lg shadow-lg p-6 text-center">
<h2 className="text-xl font-semibold text-gray-800 mb-2">Ошибка доступа</h2>
<p className="text-gray-600 mb-6 bg-gray-50 p-3 rounded border border-gray-200 text-sm">
{authError}
</p>
<button
onClick={handleLogout}
className="w-full bg-red-600 hover:bg-red-700 text-white font-medium py-2 px-4 rounded transition-colors"
>
Выйти и войти заново
</button>
</div>
</div>
) : (
<div>{/* Здесь ваше обычное приложение */}</div>
)}
</div>
);
}