diff --git a/servers/nextjs/app/(presentation-generator)/documents-preview/components/DocumentPreviewPage.tsx b/servers/nextjs/app/(presentation-generator)/documents-preview/components/DocumentPreviewPage.tsx index d2cd1bfe..7a16aa55 100644 --- a/servers/nextjs/app/(presentation-generator)/documents-preview/components/DocumentPreviewPage.tsx +++ b/servers/nextjs/app/(presentation-generator)/documents-preview/components/DocumentPreviewPage.tsx @@ -13,7 +13,7 @@ "use client"; -import { Fragment, useEffect, useState, useRef, useMemo } from "react"; +import { useEffect, useState, useRef, useMemo } from "react"; import { Skeleton } from "@/components/ui/skeleton"; import { OverlayLoader } from "@/components/ui/overlay-loader"; import { PresentationGenerationApi } from "../../services/api/presentation-generation"; @@ -201,23 +201,6 @@ const DocumentsPreviewPage: React.FC = () => { if (!isDocument) return null; - const renderParsedContent = (content: string) => { - const normalizedContent = content.replace(/\r\n/g, "\n"); - return normalizedContent.split("\n\n").map((paragraph, paragraphIndex) => { - const lines = paragraph.split("\n"); - return ( -

- {lines.map((line, lineIndex) => ( - - {line} - {lineIndex < lines.length - 1 &&
} -
- ))} -

- ); - }); - }; - return (
@@ -226,7 +209,9 @@ const DocumentsPreviewPage: React.FC = () => { {downloadingDocuments.includes(selectedDocument) ? ( ) : ( -
{renderParsedContent(textContents[selectedDocument] || "")}
+
+ {textContents[selectedDocument] || ""} +
)}