page.tsx 1018 B

123456789101112131415161718192021222324252627282930
  1. 'use client';
  2. import { useState } from 'react';
  3. import Link from 'next/link';
  4. import { type FormState, createEmptyForm } from '../types';
  5. import CrewWidgetFormPanel from '../_components/CrewWidgetFormPanel';
  6. import CrewWidgetPreviewPanel from '../_components/CrewWidgetPreviewPanel';
  7. import { Separator } from '@/components/ui/separator';
  8. export default function CrewWidgetAddPage()
  9. {
  10. const [form, setForm] = useState<FormState>(createEmptyForm());
  11. return (
  12. <>
  13. <div className="studio-page__title-row">
  14. <h1 className="studio-page__title">크루 위젯 추가</h1>
  15. <Link href="/studio/donation/crew/widget/list" className="text-sm text-muted-foreground hover:text-foreground">< 목록으로</Link>
  16. </div>
  17. <div className="pt-4 pb-4">
  18. <Separator orientation="horizontal" />
  19. </div>
  20. <div className="crew-widget-layout">
  21. <CrewWidgetPreviewPanel form={form} />
  22. <Separator orientation="vertical" />
  23. <CrewWidgetFormPanel form={form} onFormChange={setForm} />
  24. </div>
  25. </>
  26. );
  27. }