Spaces:
Sleeping
Sleeping
Update App.tsx
Browse files
App.tsx
CHANGED
|
@@ -244,7 +244,8 @@ const AppContent: React.FC = () => {
|
|
| 244 |
const showLiveAssistant = currentUser && (currentUser.role === UserRole.ADMIN || currentUser.aiAccess);
|
| 245 |
|
| 246 |
return (
|
| 247 |
-
|
|
|
|
| 248 |
<Sidebar
|
| 249 |
currentView={currentView}
|
| 250 |
onChangeView={(view) => { setCurrentView(view); setSidebarOpen(false); }}
|
|
@@ -254,10 +255,10 @@ const AppContent: React.FC = () => {
|
|
| 254 |
onClose={() => setSidebarOpen(false)}
|
| 255 |
/>
|
| 256 |
|
| 257 |
-
<div className="flex-1 flex flex-col w-full relative">
|
| 258 |
<Header user={currentUser!} title={viewTitles[currentView] || '智慧校园'} onMenuClick={() => setSidebarOpen(true)}/>
|
| 259 |
-
<main className="flex-1 overflow-x-hidden overflow-y-auto bg-gray-50 p-4 md:p-6 w-full">
|
| 260 |
-
<div className="max-w-7xl mx-auto w-full h-full">
|
| 261 |
{renderContent()}
|
| 262 |
</div>
|
| 263 |
</main>
|
|
|
|
| 244 |
const showLiveAssistant = currentUser && (currentUser.role === UserRole.ADMIN || currentUser.aiAccess);
|
| 245 |
|
| 246 |
return (
|
| 247 |
+
// Changed h-screen to fixed inset-0 to prevent body scrolling on mobile
|
| 248 |
+
<div className="fixed inset-0 flex bg-gray-50 overflow-hidden">
|
| 249 |
<Sidebar
|
| 250 |
currentView={currentView}
|
| 251 |
onChangeView={(view) => { setCurrentView(view); setSidebarOpen(false); }}
|
|
|
|
| 255 |
onClose={() => setSidebarOpen(false)}
|
| 256 |
/>
|
| 257 |
|
| 258 |
+
<div className="flex-1 flex flex-col w-full relative h-full">
|
| 259 |
<Header user={currentUser!} title={viewTitles[currentView] || '智慧校园'} onMenuClick={() => setSidebarOpen(true)}/>
|
| 260 |
+
<main className="flex-1 overflow-x-hidden overflow-y-auto bg-gray-50 p-4 md:p-6 w-full relative">
|
| 261 |
+
<div className="max-w-7xl mx-auto w-full min-h-full">
|
| 262 |
{renderContent()}
|
| 263 |
</div>
|
| 264 |
</main>
|