diff --git a/apps/web/app/dashboard/day/[dateQuery]/page.tsx b/apps/web/app/dashboard/day/[dateQuery]/page.tsx index 801c5c8..b610c2c 100644 --- a/apps/web/app/dashboard/day/[dateQuery]/page.tsx +++ b/apps/web/app/dashboard/day/[dateQuery]/page.tsx @@ -5,17 +5,14 @@ import DayView from "@/components/dashboard/days/DayView"; import spacetime from "spacetime"; import { useTimezone } from "@lifetracker/shared-react/hooks/timezones"; -export default async function DayPage({ - params, -}: { - params: { dateQuery: string }; -}) { +export default async function DayPage({ params }: { params: { dateQuery: string }; }) { + const { dateQuery } = await params; let day; const tzName = await api.users.getTimezone(); - console.log(`Displaying ${spacetime.now(tzName).format()} in ${tzName}.`); + console.log(`Displaying ${spacetime.now(tzName).format("yyyy-MM-dd")} in ${tzName}.`); try { day = await api.days.get({ - dateQuery: spacetime(params.dateQuery, tzName).format(), + dateQuery: spacetime(dateQuery, tzName).format("yyyy-MM-dd"), timezone: tzName, }); } catch (e) { diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index 794e7f2..e775cf5 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -52,7 +52,7 @@ export default async function RootLayout({ }>) { const session = await getServerAuthSession(); return ( - + { if (e.key === "Enter") { e.preventDefault(); submit(); } + if (e.key == "ArrowDown") { + e.preventDefault(); + selectNext(hour.time + 1); + } + if (e.key == "ArrowUp") { + e.preventDefault(); + selectNext(hour.time - 1); + } }} onClick={(e) => { const range = document.createRange(); @@ -117,7 +138,7 @@ export default function EditableHour({ {hour.datetime}
-