Fixed team website create.

This commit is contained in:
Mike Cao 2024-02-04 00:09:15 -08:00
parent e971f2533d
commit d9670f10a4
8 changed files with 29 additions and 39 deletions

View file

@ -0,0 +1,8 @@
'use client';
import WebsitesDataTable from '../settings/websites/WebsitesDataTable';
export function Websites({ teamId, userId }: { teamId: string; userId: string }) {
return <WebsitesDataTable teamId={teamId} userId={userId} allowEdit={false} />;
}
export default Websites;

View file

@ -1,12 +0,0 @@
'use client';
import WebsitesDataTable from '../settings/websites/WebsitesDataTable';
import { useLogin } from 'components/hooks';
export function WebsitesBrowse({ teamId, userId }: { teamId: string; userId: string }) {
const { user } = useLogin();
const allowEdit = !process.env.cloudMode;
return <WebsitesDataTable teamId={teamId} userId={userId || user.id} allowEdit={allowEdit} />;
}
export default WebsitesBrowse;

View file

@ -1,12 +1,12 @@
import WebsitesHeader from 'app/(main)/settings/websites/WebsitesHeader';
import WebsitesBrowse from './WebsitesBrowse';
import Websites from './Websites';
import { Metadata } from 'next';
export default function WebsitesPage({ params: { teamId, userId } }) {
return (
<>
<WebsitesHeader teamId={teamId} showActions={false} />
<WebsitesBrowse teamId={teamId} userId={userId} />
<WebsitesHeader teamId={teamId} />
<Websites teamId={teamId} userId={userId} />
</>
);
}