diff --git a/apps/web/src/app/test/report-playground/page.tsx b/apps/web/src/app/test/report-playground/page.tsx new file mode 100644 index 000000000..fdaffec49 --- /dev/null +++ b/apps/web/src/app/test/report-playground/page.tsx @@ -0,0 +1,218 @@ +'use client'; + +import { useEffect, useState } from 'react'; +import DynamicReportEditor from '@/components/ui/report/DynamicReportEditor'; +import type { IReportEditor } from '@/components/ui/report/ReportEditor'; +import { AppSplitter } from '@/components/ui/layouts/AppSplitter'; +import { useMount } from '@/hooks'; + +export default function ReportPlayground() { + // 150 lines of markdown about Red Rising, the sci-fi series by Pierce Brown. + // This content is used as the initial value for the report editor playground. + + const commonClassName = 'sm:px-[max(64px,calc(50%-350px))]'; + const onChangeContent = (value: string) => { + console.log(value); + }; + const readOnly = false; + const mode = 'default'; + const onReadyProp = (editor: IReportEditor) => { + console.log(editor); + }; + const isStreamingMessage = false; + + const [content, setContent] = useState(''); + + useMount(() => { + setTimeout(() => { + setContent(contentOld); + }, 1); + }); + + return ( +