página de login

This commit is contained in:
igferne
2026-01-07 13:03:10 +01:00
parent d7fcf2b416
commit e4f985e6aa
8 changed files with 333 additions and 26 deletions

View File

@@ -1,12 +1,32 @@
// App.tsx
import React from 'react';
import { Toaster } from 'react-hot-toast';
import SinglePageDataRequestIntegrated from './components/SinglePageDataRequestIntegrated';
import { AuthProvider, useAuth } from './utils/AuthContext';
import LoginPage from './components/LoginPage';
const AppContent: React.FC = () => {
const { isAuthenticated } = useAuth();
return (
<>
{isAuthenticated ? (
<SinglePageDataRequestIntegrated />
) : (
<LoginPage />
)}
</>
);
};
const App: React.FC = () => {
return (
<main className="min-h-screen">
<SinglePageDataRequestIntegrated />
</main>
<AuthProvider>
<Toaster position="top-right" />
<AppContent />
</AuthProvider>
);
};
export default App;