mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-01 20:03:30 +02:00
feat: add public report PDF preview endpoint and update report content handling for Typst-based resumes
This commit is contained in:
parent
6037058a09
commit
e2cd0557a5
6 changed files with 65 additions and 9 deletions
|
|
@ -182,9 +182,10 @@ function ResumeCard({
|
|||
const [thumbState, setThumbState] = useState<"loading" | "ready" | "error">("loading");
|
||||
|
||||
useEffect(() => {
|
||||
setPdfUrl(
|
||||
`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}/api/v1/reports/${reportId}/preview`
|
||||
);
|
||||
const previewPath = shareToken
|
||||
? `/api/v1/public/${shareToken}/reports/${reportId}/preview`
|
||||
: `/api/v1/reports/${reportId}/preview`;
|
||||
setPdfUrl(`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}${previewPath}`);
|
||||
|
||||
if (autoOpen && isDesktop && !autoOpenedRef.current) {
|
||||
autoOpenedRef.current = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue