## Bug Fixes ### Note Card Actions - Fix broken size change functionality (missing state declaration) - Implement React 19 useOptimistic for instant UI feedback - Add startTransition for non-blocking updates - Ensure smooth animations without page refresh - All note actions now work: pin, archive, color, size, checklist ### Markdown LaTeX Rendering - Add remark-math and rehype-katex plugins - Support inline equations with dollar sign syntax - Support block equations with double dollar sign syntax - Import KaTeX CSS for proper styling - Equations now render correctly instead of showing raw LaTeX ## Technical Details - Replace undefined currentNote references with optimistic state - Add optimistic updates before server actions for instant feedback - Use router.refresh() in transitions for smart cache invalidation - Install remark-math, rehype-katex, and katex packages ## Testing - Build passes successfully with no TypeScript errors - Dev server hot-reloads changes correctly
54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
import type { Metadata, Viewport } from "next";
|
|
import { Inter } from "next/font/google";
|
|
import "./globals.css";
|
|
import { Toaster } from "@/components/ui/toast";
|
|
import { LabelProvider } from "@/context/LabelContext";
|
|
import { NoteRefreshProvider } from "@/context/NoteRefreshContext";
|
|
import { SessionProviderWrapper } from "@/components/session-provider-wrapper";
|
|
|
|
const inter = Inter({
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Memento - Your Digital Notepad",
|
|
description: "A beautiful note-taking app inspired by Google Keep, built with Next.js 16",
|
|
manifest: "/manifest.json",
|
|
icons: {
|
|
icon: "/icons/icon-512.svg",
|
|
apple: "/icons/icon-512.svg",
|
|
},
|
|
appleWebApp: {
|
|
capable: true,
|
|
statusBarStyle: "default",
|
|
title: "Memento",
|
|
},
|
|
};
|
|
|
|
export const viewport: Viewport = {
|
|
themeColor: "#f59e0b",
|
|
};
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<html lang="en" suppressHydrationWarning>
|
|
<body className={inter.className}>
|
|
<SessionProviderWrapper>
|
|
<NoteRefreshProvider>
|
|
<LabelProvider>
|
|
{children}
|
|
</LabelProvider>
|
|
</NoteRefreshProvider>
|
|
<Toaster />
|
|
</SessionProviderWrapper>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|