From 751c99ebe63c6d33d4287c8bb90d50a6a47ae95e Mon Sep 17 00:00:00 2001 From: corpi Date: Thu, 12 Feb 2026 22:59:06 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=9D=B4=EB=A6=84=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/layout.tsx | 12 +++++++----- src/app/session/end/page.tsx | 2 +- src/app/session/layout.tsx | 15 +++++++++++++++ src/app/session/page.tsx | 6 +++--- 4 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 src/app/session/layout.tsx diff --git a/src/app/layout.tsx b/src/app/layout.tsx index f7fa87e..600650a 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,3 +1,4 @@ +// app/layout.tsx import type { Metadata } from "next"; import { Geist, Geist_Mono } from "next/font/google"; import "./globals.css"; @@ -13,15 +14,16 @@ const geistMono = Geist_Mono({ }); export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: { + default: "QuietSprint", + template: "%s · QuietSprint", + }, + description: "One goal. Start now.", }; export default function RootLayout({ children, -}: Readonly<{ - children: React.ReactNode; -}>) { +}: Readonly<{ children: React.ReactNode }>) { return (
- hushroom + QuietSprint
diff --git a/src/app/session/layout.tsx b/src/app/session/layout.tsx new file mode 100644 index 0000000..e9e8a5b --- /dev/null +++ b/src/app/session/layout.tsx @@ -0,0 +1,15 @@ +// app/session/layout.tsx +import type { Metadata } from "next"; + +export const metadata: Metadata = { + title: "Session", + description: "Focus session in progress.", +}; + +export default function SessionLayout({ + children, +}: { + children: React.ReactNode; +}) { + return <>{children}; +} diff --git a/src/app/session/page.tsx b/src/app/session/page.tsx index 12fb60c..241f612 100644 --- a/src/app/session/page.tsx +++ b/src/app/session/page.tsx @@ -270,12 +270,12 @@ function SessionInner() { const [goal, setGoal] = useState(""); const [nextAction, setNextAction] = useState(""); - // ✅ startedAt/now 기반 시간 + // startedAt/now 기반 시간 const [startedAt, setStartedAt] = useState(() => Date.now()); const [now, setNow] = useState(() => Date.now()); const endedRef = useRef(false); - // ✅ away: 누적 ms + (현재 away면 now-startedAt) + // away: 누적 ms + (현재 away면 now-startedAt) const [isAway, setIsAway] = useState(false); const awayTotalMsRef = useRef(0); const awayStartedAtRef = useRef(null); @@ -435,7 +435,7 @@ function SessionInner() { return formatHHMMSS(remaining); }, [elapsed, remaining, mode]); - // ✅ 타임아웃 종료(점프 포함) + // 타임아웃 종료(점프 포함) useEffect(() => { if (!duration) return; if (endedRef.current) return;