mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-07-09 03:16:01 +00:00
feat(anotações): permite anexos em notas
This commit is contained in:
@@ -1,16 +1,24 @@
|
||||
import { connection } from "next/server";
|
||||
import { NotesPage } from "@/features/notes/components/notes-page";
|
||||
import { fetchAllNotesForUser } from "@/features/notes/queries";
|
||||
import { fetchUserPreferences } from "@/features/settings/queries";
|
||||
import { getUserId } from "@/shared/lib/auth/server";
|
||||
|
||||
export default async function Page() {
|
||||
await connection();
|
||||
const userId = await getUserId();
|
||||
const { activeNotes, archivedNotes } = await fetchAllNotesForUser(userId);
|
||||
const [{ activeNotes, archivedNotes }, preferences] = await Promise.all([
|
||||
fetchAllNotesForUser(userId),
|
||||
fetchUserPreferences(userId),
|
||||
]);
|
||||
|
||||
return (
|
||||
<main className="flex flex-col gap-6">
|
||||
<NotesPage notes={activeNotes} archivedNotes={archivedNotes} />
|
||||
<NotesPage
|
||||
notes={activeNotes}
|
||||
archivedNotes={archivedNotes}
|
||||
attachmentMaxSizeMb={preferences?.attachmentMaxSizeMb ?? 50}
|
||||
/>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user