Added partner app
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import React from 'react';
|
||||
import { QueryClientProvider } from '@tanstack/react-query';
|
||||
import { queryClient } from './lib/queryClient';
|
||||
import { AuthProvider, useAuth } from './auth/AuthProvider';
|
||||
import { LandingPage } from './components/landing/LandingPage';
|
||||
import { AppNavbar } from './components/layout/AppNavbar';
|
||||
|
||||
function AppContent() {
|
||||
const { isAuthenticated, isLoading, login } = useAuth();
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-slate-950 text-slate-400 text-xs">
|
||||
<div className="flex flex-col items-center gap-3">
|
||||
<div className="h-6 w-6 animate-spin rounded-full border-2 border-emerald-500 border-t-transparent" />
|
||||
<span>Loading session...</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (!isAuthenticated) {
|
||||
return <LandingPage onLogin={login} isLoading={isLoading} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="min-h-screen flex flex-col bg-slate-950 text-slate-100">
|
||||
<AppNavbar />
|
||||
<main className="flex-1 mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8 py-8">
|
||||
{/* Clean empty workspace ready for user instructions */}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<AuthProvider>
|
||||
<AppContent />
|
||||
</AuthProvider>
|
||||
</QueryClientProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user