feat: add public report PDF preview endpoint and update report content handling for Typst-based resumes

This commit is contained in:
Anish Sarkar 2026-04-16 22:51:36 +05:30
parent 6037058a09
commit e2cd0557a5
6 changed files with 65 additions and 9 deletions

View file

@ -379,9 +379,9 @@ export function ReportPanelContent({
</div>
</div>
) : reportContent.content_type === "typst" ? (
<PdfViewer
pdfUrl={`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}/api/v1/reports/${activeReportId}/preview`}
/>
<PdfViewer
pdfUrl={`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}${shareToken ? `/api/v1/public/${shareToken}/reports/${activeReportId}/preview` : `/api/v1/reports/${activeReportId}/preview`}`}
/>
) : reportContent.content ? (
isReadOnly ? (
<div className="h-full overflow-y-auto px-5 py-4">