Replaced SettingsTable with DataTable.
This commit is contained in:
@@ -6,7 +6,7 @@ import DataTable from 'components/common/DataTable';
|
||||
import useFilterQuery from 'components/hooks/useFilterQuery';
|
||||
import WebsitesHeader from './WebsitesHeader';
|
||||
|
||||
export function WebsitesList({
|
||||
export function Websites({
|
||||
showHeader = true,
|
||||
showEditButton = true,
|
||||
showTeam,
|
||||
@@ -40,4 +40,4 @@ export function WebsitesList({
|
||||
);
|
||||
}
|
||||
|
||||
export default WebsitesList;
|
||||
export default Websites;
|
||||
@@ -1,5 +1,5 @@
|
||||
import Link from 'next/link';
|
||||
import { Button, Text, Icon, Icons, GridTable, GridColumn, Flexbox } from 'react-basics';
|
||||
import { Button, Text, Icon, Icons, GridTable, GridColumn } from 'react-basics';
|
||||
import useMessages from 'components/hooks/useMessages';
|
||||
import useUser from 'components/hooks/useUser';
|
||||
|
||||
@@ -29,7 +29,7 @@ export function WebsitesTable({ data = [], showTeam, showEditButton }) {
|
||||
} = row;
|
||||
|
||||
return (
|
||||
<Flexbox gap={10}>
|
||||
<>
|
||||
{showEditButton && (!showTeam || ownerId === user.id) && (
|
||||
<Link href={`/settings/websites/${id}`}>
|
||||
<Button>
|
||||
@@ -48,7 +48,7 @@ export function WebsitesTable({ data = [], showTeam, showEditButton }) {
|
||||
<Text>{formatMessage(labels.view)}</Text>
|
||||
</Button>
|
||||
</Link>
|
||||
</Flexbox>
|
||||
</>
|
||||
);
|
||||
}}
|
||||
</GridColumn>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import WebsitesList from 'app/(app)/settings/websites/WebsitesList';
|
||||
import Websites from './Websites';
|
||||
|
||||
export default function () {
|
||||
if (process.env.cloudMode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <WebsitesList />;
|
||||
return <Websites />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user