|  |  |  | 
|---|
|  |  |  | import { formatDistance } from 'date-fns'; | 
|---|
|  |  |  | import request from '@/utils/request'; | 
|---|
|  |  |  | import { useTheme } from '@mui/material/styles'; | 
|---|
|  |  |  | import { getTaskStsColor } from '@/utils/common'; | 
|---|
|  |  |  | import { getTaskStsColor } from '@/utils/color-util'; | 
|---|
|  |  |  | import ListEmptyTip from "../../components/ListEmptyTip"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const TaskItem = ({ record, now }) => { | 
|---|
|  |  |  | const translate = useTranslate(); | 
|---|
|  |  |  | const theme = useTheme(); | 
|---|
|  |  |  | console.log(record); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | <> | 
|---|
|  |  |  | 
|---|
|  |  |  | <List> | 
|---|
|  |  |  | {records.map(record => { | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | <> | 
|---|
|  |  |  | <React.Fragment key={record.id}> | 
|---|
|  |  |  | <TaskItem | 
|---|
|  |  |  | key={record.id} | 
|---|
|  |  |  | record={record} | 
|---|
|  |  |  | now={now} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <Divider /> | 
|---|
|  |  |  | </> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </React.Fragment> | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | })} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | {currCount < total && ( | 
|---|
|  |  |  | <Button | 
|---|
|  |  |  | onClick={() => | 
|---|
|  |  |  | 
|---|
|  |  |  | </List> | 
|---|
|  |  |  | </Box> | 
|---|
|  |  |  | ) : ( | 
|---|
|  |  |  | <Typography> | 
|---|
|  |  |  | no data found | 
|---|
|  |  |  | </Typography> | 
|---|
|  |  |  | <ListEmptyTip /> | 
|---|
|  |  |  | )} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </> | 
|---|