Write on the margins of the internet. Powered by the AT Protocol. margin.at
extension web atproto comments
at 5edfcb084786af01253bffa72de80c6af054eaed 26 lines 696 B view raw
1import LeftSidebar from "./LeftSidebar"; 2import RightSidebar from "./RightSidebar"; 3import TopNav from "./TopNav"; 4import MobileNav from "./MobileNav"; 5 6import { useTheme } from "../context/ThemeContext"; 7 8export default function AppLayout({ children }) { 9 const { layout } = useTheme(); 10 11 return ( 12 <> 13 <div 14 className={`layout-wrapper ${layout === "topnav" ? "layout-mode-topnav" : ""}`} 15 > 16 <TopNav /> 17 <div className="app-layout"> 18 {layout !== "topnav" && <LeftSidebar />} 19 <main className="main-content">{children}</main> 20 {layout !== "topnav" && <RightSidebar />} 21 </div> 22 </div> 23 <MobileNav /> 24 </> 25 ); 26}