import React, { useState } from "react";
import Navbar from "./components/Navbar";
import HeroSection from "./sections/HeroSection";
import CapabilitiesSection from "./sections/CapabilitiesSection";
import WorkspaceSection from "./sections/WorkspaceSection";
import FadingVideo from "./components/FadingVideo";
import { AuthProvider } from "./context/AuthContext";
import AuthModal from "./components/AuthModal";
function MainAppContent() {
const [isAuthModalOpen, setIsAuthModalOpen] = useState(false);
const [view, setView] = useState("landing"); // 'landing' | 'workspace'
return (
{/* Shared Background Video Layer */}
{/* Shared Navigation Header */}
{view === "landing" && (
setIsAuthModalOpen(true)}
currentView={view}
onViewChange={(newView, hash) => {
setView(newView);
if (newView === "landing" && hash) {
setTimeout(() => {
const el = document.querySelector(hash);
if (el) el.scrollIntoView({ behavior: "smooth" });
}, 50);
}
}}
/>
)}
{/* View router */}
{view === "landing" ? (
<>
{/* Hero Section (Section 1) */}
setIsAuthModalOpen(true)}
onViewWorkspace={() => setView("workspace")}
/>
{/* Capabilities Section (Section 2) */}
>
) : (
/* Workspace / Chat Section */
setView("landing")} />
)}
{/* Auth Modal */}
setIsAuthModalOpen(false)} />
);
}
export default function App() {
return (
);
}