import React from 'react';
import Page from '@/layouts/index';
import PowerList from '@/components/PowerList';
import { getTaNotice } from '@/services/tanotice';
import Card from './components/Card/index';

const sid1 = Math.random().toString(36).substring(2, 8);
// const sid2 = Math.random().toString(36).substring(2, 8);

export default (props) => {

  const [loading, setLoading] = React.useState(false);

  const params = React.useMemo(() => {
    return {status: 1};
  }, []);

  return (
    <Page tabBar="notice">
      <PowerList
        sid={sid1}
        request={getTaNotice}
        params={params}
        renderItem={(item) => (
          <Card key={item.noticeId} dataset={item} />
        )}
      />
    </Page>
  )
}