refactor: 이름 변경
This commit is contained in:
@@ -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 (
|
||||
<html lang="en">
|
||||
<body
|
||||
|
||||
@@ -62,7 +62,7 @@ function SessionEndInner() {
|
||||
<main className="min-h-screen w-full" style={{ backgroundColor: BG }}>
|
||||
<header className="px-5 pt-6">
|
||||
<div className="select-none text-xl font-bold tracking-tight leading-none text-slate-800">
|
||||
hushroom
|
||||
QuietSprint
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
15
src/app/session/layout.tsx
Normal file
15
src/app/session/layout.tsx
Normal file
@@ -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}</>;
|
||||
}
|
||||
@@ -270,12 +270,12 @@ function SessionInner() {
|
||||
const [goal, setGoal] = useState("");
|
||||
const [nextAction, setNextAction] = useState("");
|
||||
|
||||
// ✅ startedAt/now 기반 시간
|
||||
// startedAt/now 기반 시간
|
||||
const [startedAt, setStartedAt] = useState<number>(() => Date.now());
|
||||
const [now, setNow] = useState<number>(() => 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<number | null>(null);
|
||||
@@ -435,7 +435,7 @@ function SessionInner() {
|
||||
return formatHHMMSS(remaining);
|
||||
}, [elapsed, remaining, mode]);
|
||||
|
||||
// ✅ 타임아웃 종료(점프 포함)
|
||||
// 타임아웃 종료(점프 포함)
|
||||
useEffect(() => {
|
||||
if (!duration) return;
|
||||
if (endedRef.current) return;
|
||||
|
||||
Reference in New Issue
Block a user