Implemented partnerui

This commit is contained in:
2026-10-23 00:58:47 +02:00
parent 9ed210613e
commit 8f58e15f0f
27 changed files with 11416 additions and 983 deletions
+13 -32
View File
@@ -2,29 +2,10 @@ import React from 'react';
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
import { QueryClientProvider } from '@tanstack/react-query';
import { queryClient } from './lib/queryClient';
import { AuthProvider, useAuth } from './auth/AuthProvider';
import { AuthProvider, ProtectedRoute, useAuth } from './auth/AuthProvider';
import { ToastProvider } from './components/ui/Toast';
import { LandingPage } from './components/landing/LandingPage';
import { DashboardPage } from './components/dashboard/DashboardPage';
import { LaserDivider } from './components/layout/LaserDivider';
function AuthenticatedLayout() {
return (
<div className="h-screen w-screen overflow-hidden bg-slate-950 text-slate-100 flex flex-row select-none">
{/* Fixed-width vertical navigation pane on the left */}
<aside className="w-64 sm:w-72 md:w-80 shrink-0 h-full relative flex flex-col">
{/* Navigation placeholder / empty clean pane */}
</aside>
{/* Laser beam divider with central light source */}
<LaserDivider />
{/* Content pane occupying the rest of the screen */}
<main className="flex-1 h-full min-w-0 relative flex flex-col overflow-y-auto">
<DashboardPage />
</main>
</div>
);
}
function AppRoutes() {
const { isAuthenticated, isLoading, login } = useAuth();
@@ -55,16 +36,14 @@ function AppRoutes() {
<Route
path="/dashboard"
element={
isAuthenticated ? (
<AuthenticatedLayout />
) : (
<LandingPage onLogin={login} isLoading={isLoading} />
)
<ProtectedRoute>
<DashboardPage />
</ProtectedRoute>
}
/>
<Route
path="*"
element={<Navigate to={isAuthenticated ? "/dashboard" : "/"} replace />}
element={<Navigate to={isAuthenticated ? '/dashboard' : '/'} replace />}
/>
</Routes>
);
@@ -73,11 +52,13 @@ function AppRoutes() {
export default function App() {
return (
<QueryClientProvider client={queryClient}>
<AuthProvider>
<BrowserRouter>
<AppRoutes />
</BrowserRouter>
</AuthProvider>
<ToastProvider>
<AuthProvider>
<BrowserRouter>
<AppRoutes />
</BrowserRouter>
</AuthProvider>
</ToastProvider>
</QueryClientProvider>
);
}