Projekt

Obecné

Profil

Stáhnout (969 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1 b225ffee Fantič
import { Center, VStack, Box, Text, HStack, ScrollView } from "native-base";
2 cb25df10 Fantič
import { Note } from "../../types/note";
3
import NoteView from "./NoteView";
4
5 3a226033 Fantič
const NotesListView = (props: { notes: Note[], handleReply : any, handleDelete : any, handleEdit : any, setConfirmDialog: any, navigation: any}) => {
6 cb25df10 Fantič
    const notes = props.notes;
7
    return (
8 b225ffee Fantič
        <ScrollView>
9 cb25df10 Fantič
            {
10
                notes && notes.length > 0 ? (
11
                    <VStack>
12
                        {notes.map((note, index) => (
13 3a226033 Fantič
                            <NoteView key={index} note={note} handleReply={props.handleReply} handleDelete={props.handleDelete} handleEdit={props.handleEdit} setConfirmDialog={props.setConfirmDialog} navigation={props.navigation}/>
14 cb25df10 Fantič
                        ))}
15
                    </VStack>
16
                ) : (
17
                    <Text>There are no notes.</Text>
18
                )
19
            }
20 b225ffee Fantič
        </ScrollView>
21 cb25df10 Fantič
    );
22
}
23
24
export default NotesListView