umami/src/app/(main)/settings/websites/WebsitesSettingsPage.tsx

18 lines
502 B
TypeScript
Raw Normal View History

2024-02-19 19:31:11 +00:00
'use client';
2024-02-23 06:21:11 +00:00
import { useLogin } from 'components/hooks';
2024-02-19 19:31:11 +00:00
import WebsitesDataTable from './WebsitesDataTable';
import WebsitesHeader from './WebsitesHeader';
2024-02-23 06:21:11 +00:00
import { ROLES } from 'lib/constants';
2024-02-19 19:31:11 +00:00
export default function WebsitesSettingsPage({ teamId }: { teamId: string }) {
2024-02-23 06:21:11 +00:00
const { user } = useLogin();
const canCreate = user.role !== ROLES.viewOnly;
2024-02-19 19:31:11 +00:00
return (
<>
2024-02-23 06:21:11 +00:00
<WebsitesHeader teamId={teamId} allowCreate={canCreate} />
2024-02-19 19:31:11 +00:00
<WebsitesDataTable teamId={teamId} />
</>
);
}