mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +00:00
refactor(dashboard): reorganiza widgets e remove magnet-lines
This commit is contained in:
15
lib/dashboard/notes-mappers.ts
Normal file
15
lib/dashboard/notes-mappers.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { Note } from "@/components/anotacoes/types";
|
||||
import type { DashboardNote } from "@/lib/dashboard/notes";
|
||||
|
||||
export const mapDashboardNoteToNote = (note: DashboardNote): Note => ({
|
||||
id: note.id,
|
||||
title: note.title,
|
||||
description: note.description,
|
||||
type: note.type,
|
||||
tasks: note.tasks,
|
||||
arquivada: note.arquivada,
|
||||
createdAt: note.createdAt,
|
||||
});
|
||||
|
||||
export const mapDashboardNotesToNotes = (notes: DashboardNote[]) =>
|
||||
notes.map(mapDashboardNoteToNote);
|
||||
Reference in New Issue
Block a user