Fixed resume gen
Some checks failed
Docker Deploy / build-and-push (push) Has been cancelled

This commit is contained in:
2025-06-26 23:41:29 -06:00
parent b4298e78ef
commit 0d43c3af47
7 changed files with 270 additions and 230 deletions

View File

@@ -1,12 +1,12 @@
import { useState } from "preact/hooks";
interface PdfDownloadButtonProps {
interface ResumeDownloadButtonProps {
className?: string;
}
export default function PdfDownloadButton({
export default function ResumeDownloadButton({
className = "",
}: PdfDownloadButtonProps) {
}: ResumeDownloadButtonProps) {
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState<string | null>(null);
@@ -15,7 +15,7 @@ export default function PdfDownloadButton({
setError(null);
try {
const response = await fetch("/api/resume/pdf");
const response = await fetch(`/api/resume/pdf?t=${Date.now()}`);
if (!response.ok) {
throw new Error(
@@ -57,18 +57,7 @@ export default function PdfDownloadButton({
Generating PDF...
</>
) : (
<>
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="currentColor"
>
<path d="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z" />
</svg>
Generate PDF Resume
</>
<>Download Resume</>
)}
</button>
{error && <div class="mt-2 text-error text-sm">{error}</div>}