import React from 'react';
import Taro from '@tarojs/taro';
import { View } from '@tarojs/components';
import Page from '@/layouts/index';
import PowerList from '@/components/PowerList';
import { getTaMessage } from '@/services/tamessage';
import { useModel } from '@/store';
import Card from './components/Card';

export default (props) => {
  const { duty } = useModel('user');
  
  return (
    <Page>
      <PowerList
        request={getTaMessage}
        renderItem={(item) => (
          <Card key={item.msgId} item={item} duty={duty} />
        )}
      />
    </Page>
  )
}
