fix create website / teams permissions

This commit is contained in:
Francis Cao 2024-02-22 22:21:11 -08:00
parent 8fbd6871f7
commit 490bb11771
5 changed files with 20 additions and 17 deletions

View file

@ -1,14 +1,11 @@
'use client';
import WebsitesHeader from 'app/(main)/settings/websites/WebsitesHeader';
import WebsitesDataTable from 'app/(main)/settings/websites/WebsitesDataTable';
import { useLogin } from 'components/hooks';
export default function WebsitesPage({ teamId }: { teamId: string; userId: string }) {
const { user } = useLogin();
export default function WebsitesPage({ teamId }: { teamId: string }) {
return (
<>
<WebsitesHeader teamId={teamId} allowCreate={user.role !== 'view-only'} />
<WebsitesHeader teamId={teamId} allowCreate={false} />
<WebsitesDataTable teamId={teamId} allowEdit={false} />
</>
);