feat: Initialize AI Studio project structure
Sets up the basic project files and dependencies for an AI Studio application. Includes README, `.env.example`, `.gitignore`, basic HTML structure, metadata, `package.json`, Vite configuration, and initial React component setup. This commit provides the foundation for running and deploying the AI Studio app locally.
This commit is contained in:
26
src/App.tsx
Normal file
26
src/App.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import { useState } from 'react';
|
||||
import { Dashboard } from './components/Dashboard';
|
||||
import { Sidebar } from './components/Sidebar';
|
||||
import { Header } from './components/Header';
|
||||
|
||||
export default function App() {
|
||||
const [currentView, setCurrentView] = useState('overall');
|
||||
|
||||
const viewTitles: Record<string, string> = {
|
||||
'overall': '全网精细化运营大盘',
|
||||
'efficiency': '各站点调度与效能监控',
|
||||
'users': '平台用户与资产池'
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex h-screen bg-slate-50 overflow-hidden font-sans">
|
||||
<Sidebar currentView={currentView} setCurrentView={setCurrentView} />
|
||||
<div className="flex flex-col flex-1 overflow-hidden">
|
||||
<Header title={viewTitles[currentView] || '数据分析'} />
|
||||
<main className="flex-1 overflow-y-auto p-4 md:p-6 lg:p-8">
|
||||
<Dashboard currentView={currentView} />
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user