mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +00:00
16 lines
476 B
TypeScript
16 lines
476 B
TypeScript
import type { DashboardNote } from "@/features/dashboard/notes-queries";
|
|
import type { Note } from "@/features/notes/components/types";
|
|
|
|
export const mapDashboardNoteToNote = (note: DashboardNote): Note => ({
|
|
id: note.id,
|
|
title: note.title,
|
|
description: note.description,
|
|
type: note.type,
|
|
tasks: note.tasks,
|
|
archived: note.archived,
|
|
createdAt: note.createdAt,
|
|
});
|
|
|
|
export const mapDashboardNotesToNotes = (notes: DashboardNote[]) =>
|
|
notes.map(mapDashboardNoteToNote);
|