럭키시트 로드 가능, 옵션이 안불러짐
This commit is contained in:
43
src/App.tsx
43
src/App.tsx
@@ -2,8 +2,14 @@ import { useAppStore } from "./stores/useAppStore";
|
||||
import { Card, CardContent } from "./components/ui/card";
|
||||
import { Button } from "./components/ui/button";
|
||||
import { FileUpload } from "./components/sheet/FileUpload";
|
||||
import { SheetViewer } from "./components/sheet/SheetViewer";
|
||||
|
||||
function App() {
|
||||
const { currentFile, sheets, resetApp } = useAppStore();
|
||||
|
||||
// 파일이 업로드되어 시트 데이터가 있는 경우와 없는 경우 구분
|
||||
const hasSheetData = currentFile && sheets && sheets.length > 0;
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50">
|
||||
{/* 헤더 */}
|
||||
@@ -14,17 +20,44 @@ function App() {
|
||||
<h1 className="text-2xl font-bold text-blue-600">sheetEasy AI</h1>
|
||||
</div>
|
||||
<div className="flex items-center space-x-4">
|
||||
<span className="text-sm text-gray-600">
|
||||
Excel 파일 AI 처리 도구
|
||||
</span>
|
||||
{hasSheetData && (
|
||||
<>
|
||||
<span className="text-sm text-gray-600">
|
||||
{currentFile.name}
|
||||
</span>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={resetApp}
|
||||
className="text-gray-600 hover:text-gray-800"
|
||||
>
|
||||
새 파일
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
{!hasSheetData && (
|
||||
<span className="text-sm text-gray-600">
|
||||
Excel 파일 AI 처리 도구
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{/* 메인 콘텐츠 */}
|
||||
<main className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
<FileUpload />
|
||||
<main className="h-[calc(100vh-4rem)]">
|
||||
{hasSheetData ? (
|
||||
// 파일이 업로드된 경우: SheetViewer 표시 (전체화면)
|
||||
<div className="h-full">
|
||||
<SheetViewer className="h-full" />
|
||||
</div>
|
||||
) : (
|
||||
// 파일이 업로드되지 않은 경우: FileUpload 표시 (중앙 정렬)
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
<FileUpload />
|
||||
</div>
|
||||
)}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user