유니버CE 초기화 테스트 완료
This commit is contained in:
64
src/App.tsx
64
src/App.tsx
@@ -1,14 +1,9 @@
|
||||
import { useAppStore } from "./stores/useAppStore";
|
||||
import { Card, CardContent } from "./components/ui/card";
|
||||
import { useState } from "react";
|
||||
import { Button } from "./components/ui/button";
|
||||
import { FileUpload } from "./components/sheet/FileUpload";
|
||||
import { SheetViewer } from "./components/sheet/SheetViewer";
|
||||
import TestSheetViewer from "./components/sheet/TestSheetViewer";
|
||||
|
||||
function App() {
|
||||
const { currentFile, sheets, resetApp } = useAppStore();
|
||||
|
||||
// 파일이 업로드되어 시트 데이터가 있는 경우와 없는 경우 구분
|
||||
const hasSheetData = currentFile && sheets && sheets.length > 0;
|
||||
const [showTestViewer, setShowTestViewer] = useState(false);
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50">
|
||||
@@ -20,24 +15,19 @@ function App() {
|
||||
<h1 className="text-2xl font-bold text-blue-600">sheetEasy AI</h1>
|
||||
</div>
|
||||
<div className="flex items-center space-x-4">
|
||||
{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 && (
|
||||
{/* 테스트 뷰어 토글 버튼 */}
|
||||
<Button
|
||||
variant={showTestViewer ? "default" : "outline"}
|
||||
size="sm"
|
||||
onClick={() => setShowTestViewer(!showTestViewer)}
|
||||
className="bg-green-500 hover:bg-green-600 text-white border-green-500"
|
||||
>
|
||||
🧪 테스트 뷰어
|
||||
</Button>
|
||||
|
||||
{!showTestViewer && (
|
||||
<span className="text-sm text-gray-600">
|
||||
Excel 파일 AI 처리 도구
|
||||
Univer CE 테스트 모드
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
@@ -47,15 +37,29 @@ function App() {
|
||||
|
||||
{/* 메인 콘텐츠 */}
|
||||
<main className="h-[calc(100vh-4rem)]">
|
||||
{hasSheetData ? (
|
||||
// 파일이 업로드된 경우: SheetViewer 표시 (전체화면)
|
||||
{showTestViewer ? (
|
||||
// 테스트 뷰어 표시
|
||||
<div className="h-full">
|
||||
<SheetViewer className="h-full" />
|
||||
<TestSheetViewer />
|
||||
</div>
|
||||
) : (
|
||||
// 파일이 업로드되지 않은 경우: FileUpload 표시 (중앙 정렬)
|
||||
// 메인 페이지
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
<FileUpload />
|
||||
<div className="text-center py-12">
|
||||
<h2 className="text-3xl font-bold text-gray-900 mb-4">
|
||||
🧪 Univer CE 테스트 모드
|
||||
</h2>
|
||||
<p className="text-lg text-gray-600 mb-8">
|
||||
현재 Univer CE 전용 테스트 뷰어를 사용해보세요
|
||||
</p>
|
||||
<Button
|
||||
onClick={() => setShowTestViewer(true)}
|
||||
size="lg"
|
||||
className="bg-blue-600 hover:bg-blue-700 text-white px-8 py-3"
|
||||
>
|
||||
테스트 뷰어 시작하기 →
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user