mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 01:25:37 +01:00
Updates for cloud mode.
Some checks failed
Node.js CI / build (postgresql, 18.18) (push) Has been cancelled
Some checks failed
Node.js CI / build (postgresql, 18.18) (push) Has been cancelled
This commit is contained in:
parent
dc1736458b
commit
f40e1b44f3
51 changed files with 251 additions and 173 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import Link from 'next/link';
|
||||
import { WebsitesTable } from './WebsitesTable';
|
||||
import { DataGrid } from '@/components/common/DataGrid';
|
||||
import { useUserWebsitesQuery } from '@/components/hooks';
|
||||
import { useNavigation, useUserWebsitesQuery } from '@/components/hooks';
|
||||
|
||||
export function WebsitesDataTable({
|
||||
teamId,
|
||||
|
|
@ -14,16 +15,21 @@ export function WebsitesDataTable({
|
|||
showActions?: boolean;
|
||||
}) {
|
||||
const queryResult = useUserWebsitesQuery({ teamId });
|
||||
const { renderUrl } = useNavigation();
|
||||
|
||||
const renderLink = (row: any) => (
|
||||
<Link href={renderUrl(`/websites/${row.id}`, false)}>{row.name}</Link>
|
||||
);
|
||||
|
||||
return (
|
||||
<DataGrid query={queryResult} allowSearch allowPaging>
|
||||
{({ data }) => (
|
||||
<WebsitesTable
|
||||
teamId={teamId}
|
||||
data={data}
|
||||
showActions={showActions}
|
||||
allowEdit={allowEdit}
|
||||
allowView={allowView}
|
||||
renderLink={renderLink}
|
||||
/>
|
||||
)}
|
||||
</DataGrid>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue