KO
베타 번역

@core / kit-landing

1.0.1 ▾
인증됨MIT
GitHub

Next.js 랜딩 페이지 키트: 블록 페이지, 리드 폼, 쿠키 배너, 동의 기반 픽셀

코드파일 14개컨텍스트약 910토큰검사 통과

.genpmignore 적용 후 주입될 정확한 트리입니다. 고정 대상:

src/app/(landing)/_lib/widgets.ts읽기 전용 · f730e59
// Widget del panel: leads por landing en los últimos 7 días (envíos de formularios hechos desde /lp/…).
import { and, count, desc, gte, like } from 'drizzle-orm';
import type { AdminWidget } from '@/lib/admin';
import { getDb } from '@/lib/db';
import { formSubmissions } from '@/lib/forms';
import { LANDING_PREFIX } from './landings';

export const leadsByLandingWidget: AdminWidget = {
  name: 'leads-by-landing',
  title: 'Leads by landing (7 days)',
  permission: 'submissions:read',
  async load() {
    const rows = await getDb()
      .select({ path: formSubmissions.sourcePath, n: count() })
      .from(formSubmissions)
      .where(and(like(formSubmissions.sourcePath, `${LANDING_PREFIX}/%`), gte(formSubmissions.createdAt, new Date(Date.now() - 7 * 86_400_000))))
      .groupBy(formSubmissions.sourcePath)
      .orderBy(desc(count()))
      .limit(10);
    return { rows: rows.map((r) => ({ label: r.path ?? '', value: r.n, href: r.path ?? undefined })) };
  },
};

@core/kit-landing 신고

패키지를 신고하려면 GitHub로 로그인하세요.