mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 07:43:16 +10:00
27 lines
864 B
TypeScript
27 lines
864 B
TypeScript
import React from 'react';
|
|
|
|
import { getRequiredServerComponentSession } from '@documenso/lib/next-auth/get-server-component-session';
|
|
import { getTeamByUrl } from '@documenso/lib/server-only/team/get-team';
|
|
|
|
import type { TemplatesPageViewProps } from '~/app/(dashboard)/templates/templates-page-view';
|
|
import { TemplatesPageView } from '~/app/(dashboard)/templates/templates-page-view';
|
|
|
|
type TeamTemplatesPageProps = {
|
|
searchParams?: TemplatesPageViewProps['searchParams'];
|
|
params: {
|
|
teamUrl: string;
|
|
};
|
|
};
|
|
|
|
export default async function TeamTemplatesPage({
|
|
searchParams = {},
|
|
params,
|
|
}: TeamTemplatesPageProps) {
|
|
const { teamUrl } = params;
|
|
|
|
const { user } = await getRequiredServerComponentSession();
|
|
const team = await getTeamByUrl({ userId: user.id, teamUrl });
|
|
|
|
return <TemplatesPageView searchParams={searchParams} team={team} />;
|
|
}
|