/
NotesContainer.tsx
31 lines (29 loc) · 1.34 KB
/
NotesContainer.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import React from "react";
import { Text, View, ScrollArea } from "@nodegui/react-nodegui";
import { useNotes } from "../utils/notes";
import NoteCard from "./NoteCard";
const NotesContainer = () => {
// let notes = useNotes(); using this breaks
let notes = [
{identifier: "dsad", title: "title", tags: [], creationDate: "dsads"},
{identifier: "dsad", title: "title", tags: [], creationDate: "dsads"},
{identifier: "dsad", title: "title", tags: [], creationDate: "dsads"},
{identifier: "dsad", title: "title", tags: [], creationDate: "dsads"},
{identifier: "dsad", title: "title", tags: [], creationDate: "dsads"},
{identifier: "dsad", title: "title", tags: [], creationDate: "dsads"},
{identifier: "dsad", title: "title", tags: [], creationDate: "dsads"},
{identifier: "dsad", title: "title", tags: [], creationDate: "dsads"},
{identifier: "dsad", title: "title", tags: [], creationDate: "dsads"},
{identifier: "dsad", title: "title", tags: [], creationDate: "dsads"},
{identifier: "dsad", title: "title", tags: [], creationDate: "dsads"},
]
return (
<View style="height: '100%';">
<Text id="welcome-text">Notes from this day 😌 {`<hr />`}</Text>
{notes.slice(0, 20).map((note) => (
<NoteCard key={note.identifier} note={note} />
))}
</View>
);
};
export default NotesContainer;