import { Component, ReactNode } from 'react';
import NoteCard from '@/components/NoteCard/NoteCard';
import { TicketNote } from '@/pages/TicketDetail/TicketNote';
import { View } from '@tarojs/components';

interface NoteListProps {
  noteList: Array<TicketNote>;
}

export default class NoteList extends Component<NoteListProps, {}> {
  props: Readonly<NoteListProps> = {
    noteList: [],
  };
  render(): ReactNode {
    return (
      <View>
        {this.props.noteList.map((note, idx) => (
          <View key={idx}>
            <NoteCard note={note} />
          </View>
        ))}
      </View>
    );
  }
}
