feat: finalize academy redesign and production readiness
Align admin, community, search, library, learning and course management with the mockup. Add saved courses, download history, public community feed, instructor directory, backend search, course views, admin content tools and community moderation. Harden API and Nginx for production.
This commit is contained in:
26
components/shell/AppShell.tsx
Normal file
26
components/shell/AppShell.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import { Sidebar } from './Sidebar';
|
||||
import { MobileBack, MobileTabBar } from './MobileNavigation';
|
||||
import { useIsMobile } from '../../hooks/useMediaQuery';
|
||||
|
||||
export const AppShell: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
||||
const location = useLocation();
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
useEffect(() => {
|
||||
window.scrollTo(0, 0);
|
||||
document.body.classList.toggle('immersive', location.pathname.includes('/aulas/'));
|
||||
return () => document.body.classList.remove('immersive');
|
||||
}, [location.pathname]);
|
||||
|
||||
return (
|
||||
<>
|
||||
{!isMobile && <Sidebar />}
|
||||
{isMobile && <MobileBack />}
|
||||
{/* Keyed by path: the arrival animation only plays when navigating to a new page. */}
|
||||
<div className="main" key={location.pathname}>{children}</div>
|
||||
{isMobile && <MobileTabBar />}
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user