Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
cd2cd06ce8
commit
34bb098ef1
@@ -12,6 +12,7 @@ import { useAuth } from "@/lib/auth";
|
||||
import { toast } from "sonner";
|
||||
import { Download, Loader2, Save, Trash2 } from "lucide-react";
|
||||
import { downloadGeneric } from "@/lib/docx-pleading";
|
||||
import { promptFilename } from "@/lib/prompt-filename";
|
||||
import { Packer } from "docx";
|
||||
|
||||
export const Route = createFileRoute("/documents/templates/$templateId")({
|
||||
@@ -120,9 +121,11 @@ function TemplateDetailPage() {
|
||||
const fontSizePt: number = tpl?.font_size_pt || 12;
|
||||
|
||||
const downloadOnly = async () => {
|
||||
const name = promptFilename(docName || "Document", "docx");
|
||||
if (!name) return;
|
||||
await downloadGeneric(
|
||||
{ title: isLetter ? undefined : docName, body: merged, fontFamily, fontSizePt },
|
||||
docName || "Document",
|
||||
name,
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user