diff --git a/apps/web/app/dashboard/day/[dateQuery]/page.tsx b/apps/web/app/dashboard/day/[dateQuery]/page.tsx index b610c2c..8e1a1d5 100644 --- a/apps/web/app/dashboard/day/[dateQuery]/page.tsx +++ b/apps/web/app/dashboard/day/[dateQuery]/page.tsx @@ -4,18 +4,20 @@ import { TRPCError } from "@trpc/server"; import DayView from "@/components/dashboard/days/DayView"; import spacetime from "spacetime"; import { useTimezone } from "@lifetracker/shared-react/hooks/timezones"; +import { date } from "drizzle-orm/pg-core"; 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("yyyy-MM-dd")} in ${tzName}.`); + // console.log(`(dashboard/day/[dateQuery]/page.tsx) Loading ${spacetime.now(tzName).format("yyyy-MM-dd")} in ${tzName}.`); try { day = await api.days.get({ dateQuery: spacetime(dateQuery, tzName).format("yyyy-MM-dd"), timezone: tzName, }); } catch (e) { + console.log("DATEQ", params); if (e instanceof TRPCError) { if (e.code == "NOT_FOUND") { notFound(); diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index e775cf5..794e7f2 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 ( - + import('next-themes').then((e) => e.ThemeProvider), + { + ssr: false, + } +) +import { useTheme } from 'next-themes' +import { type ThemeProviderProps } from 'next-themes/dist/types' +import dynamic from 'next/dynamic' export function ThemeProvider({ children, ...props }: ThemeProviderProps) { - return {children}; + return {children} } export function useToggleTheme() {