22 lines
847 B
JavaScript
22 lines
847 B
JavaScript
import React from 'react';
|
|
import { Table, Button } from 'semantic-ui-react';
|
|
|
|
const ListItem = ({ i18n, data, delWristband, editWristband }) => {
|
|
|
|
return (
|
|
<Table.Row>
|
|
<Table.Cell>
|
|
<Button content="Edit" basic onClick={()=>{editWristband(1, data)}} />
|
|
<Button content="Delete" basic onClick={()=>{delWristband(data.uid)}} />
|
|
</Table.Cell>
|
|
<Table.Cell>{data.mac}</Table.Cell>
|
|
<Table.Cell>{data.name}</Table.Cell>
|
|
<Table.Cell>{data.identity}</Table.Cell>
|
|
<Table.Cell>{data.monitor == 1 ? '啟用' : '停用'}</Table.Cell>
|
|
<Table.Cell>{data.notify == 1 ? '啟用' : '停用'}</Table.Cell>
|
|
<Table.Cell>{data.switch == 1 ? '啟用' : '停用'}</Table.Cell>
|
|
</Table.Row>
|
|
)
|
|
}
|
|
|
|
export default ListItem; |