mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
* feat(ui): simplified titles and adjusted some wording * style(ui): simplified some views for mobile * style(ui): make job table responsive for mobile * style(ui): login button gap * style(ui): dont hide mobile columns * fix: method return type
43 lines
1.0 KiB
JavaScript
43 lines
1.0 KiB
JavaScript
import React from 'react';
|
|
|
|
import { Empty, Table, Button } from '@douyinfe/semi-ui';
|
|
import { IconDelete } from '@douyinfe/semi-icons';
|
|
|
|
export default function ProviderTable({ providerData = [], onRemove } = {}) {
|
|
return (
|
|
<Table
|
|
pagination={false}
|
|
empty={<Empty description="No providers found." />}
|
|
columns={[
|
|
{
|
|
title: 'Name',
|
|
dataIndex: 'name',
|
|
},
|
|
{
|
|
title: 'URL',
|
|
dataIndex: 'url',
|
|
render: (_, data) => {
|
|
return (
|
|
<a href={data.url} target="_blank" rel="noopener noreferrer">
|
|
Visit site
|
|
</a>
|
|
);
|
|
},
|
|
},
|
|
{
|
|
title: '',
|
|
dataIndex: 'tools',
|
|
render: (_, record) => {
|
|
return (
|
|
<div style={{ float: 'right' }}>
|
|
<Button type="danger" icon={<IconDelete />} onClick={() => onRemove(record.url)} />
|
|
</div>
|
|
);
|
|
},
|
|
},
|
|
]}
|
|
dataSource={providerData}
|
|
/>
|
|
);
|
|
}
|