Files
myeasycms-v2/apps/web/app/[locale]/home/[account]/site-builder/new/page.tsx
T. Zehetbauer c6d564836f
Some checks failed
Workflow / ʦ TypeScript (push) Failing after 17m4s
Workflow / ⚫️ Test (push) Has been skipped
fix: add missing newlines at the end of JSON files; clean up formatting in page components
2026-04-02 11:02:58 +02:00

34 lines
961 B
TypeScript

import { getTranslations } from 'next-intl/server';
import { CreatePageForm } from '@kit/site-builder/components';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { AccountNotFound } from '~/components/account-not-found';
import { CmsPageShell } from '~/components/cms-page-shell';
interface Props {
params: Promise<{ account: string }>;
}
export default async function NewSitePage({ params }: Props) {
const { account } = await params;
const t = await getTranslations('siteBuilder');
const client = getSupabaseServerClient();
const { data: acct } = await client
.from('accounts')
.select('id')
.eq('slug', account)
.single();
if (!acct) return <AccountNotFound />;
return (
<CmsPageShell
account={account}
title={t('pages.newPage')}
description={t('pages.newPageDescription')}
>
<CreatePageForm accountId={acct.id} account={account} />
</CmsPageShell>
);
}