From a2591635f31229ca8a8fe56cc18acb282a3a4ec1 Mon Sep 17 00:00:00 2001 From: eedo_y Date: Thu, 18 Dec 2025 15:01:54 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5fix=20:=20PDF=20=EC=9D=B4=EB=A6=84?= =?UTF-8?q?=20=EC=97=85=EB=A1=9C=EB=93=9C=20=EB=B0=A9=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/home-calendar.tsx | 101 +++++--------------------------- components/pdf-upload-modal.tsx | 13 ++-- 2 files changed, 20 insertions(+), 94 deletions(-) diff --git a/components/home-calendar.tsx b/components/home-calendar.tsx index 722d25d..370d2f5 100644 --- a/components/home-calendar.tsx +++ b/components/home-calendar.tsx @@ -18,13 +18,10 @@ import { Home, ChevronDown, Lock, - Pencil, - X, } from "lucide-react" import { Button } from "@/components/ui/button" import { Card } from "@/components/ui/card" import { Progress } from "@/components/ui/progress" -import { Input } from "@/components/ui/input" import { Dialog, DialogContent, @@ -71,8 +68,6 @@ export function HomeCalendar({ studyPlans, onAddPdf, onViewPdf, onUpdatePlans, o const [deleteConfirmPlan, setDeleteConfirmPlan] = useState(null) const [expandedPlans, setExpandedPlans] = useState>(new Set(studyPlans.map((p) => p.id))) const [expandedChapters, setExpandedChapters] = useState>(new Set()) - const [editingPlanId, setEditingPlanId] = useState(null) - const [editingPlanName, setEditingPlanName] = useState("") const today = new Date() today.setHours(0, 0, 0, 0) @@ -253,27 +248,6 @@ export function HomeCalendar({ studyPlans, onAddPdf, onViewPdf, onUpdatePlans, o setExpandedChapters(newExpanded) } - const startEditingPlanName = (planId: string, currentName: string) => { - setEditingPlanId(planId) - setEditingPlanName(currentName) - } - - const saveEditingPlanName = () => { - if (editingPlanId && editingPlanName.trim()) { - const updatedPlans = studyPlans.map((plan) => - plan.id === editingPlanId ? { ...plan, pdfName: editingPlanName.trim() } : plan, - ) - onUpdatePlans(updatedPlans) - } - setEditingPlanId(null) - setEditingPlanName("") - } - - const cancelEditingPlanName = () => { - setEditingPlanId(null) - setEditingPlanName("") - } - const formatDateHeader = () => { const year = currentDate.getFullYear() const month = currentDate.getMonth() + 1 @@ -648,66 +622,23 @@ export function HomeCalendar({ studyPlans, onAddPdf, onViewPdf, onUpdatePlans, o >
{/* 대제목: PDF 이름 */} -
- {editingPlanId === planId ? ( -
- setEditingPlanName(e.target.value)} - onKeyDown={(e) => { - if (e.key === "Enter") saveEditingPlanName() - if (e.key === "Escape") cancelEditingPlanName() - }} - className="text-lg font-bold bg-secondary/50 border-primary/30 focus-visible:ring-primary/30" - autoFocus - /> - - + + - - - - )} -
+
+

{plan.pdfName}

+

{chapters.length}개 챕터

+
+ + +
diff --git a/components/pdf-upload-modal.tsx b/components/pdf-upload-modal.tsx index e638a12..b389d40 100644 --- a/components/pdf-upload-modal.tsx +++ b/components/pdf-upload-modal.tsx @@ -198,18 +198,13 @@ export function PdfUploadModal({ open, onOpenChange, onPlanCreated }: PdfUploadM
-