import { getAuth } from "@/app/actions/auth"; import { getNotes } from "@/app/actions/notes"; import NoteCard from "@/components/ui/NoteCard"; import { Metadata } from "next"; import { redirect } from "next/navigation"; export const metadata: Metadata = { title: "Notes - Rhyme", description: "View and edit your notes", }; export default async function Notes() { const user = await getAuth(); if (!user) { redirect("/auth"); } const notes = await getNotes(user); return ( <>

Notes of {user.username}:

{notes.map((note) => )} ); }