From b687ad6974b8a2ef357d1af360026ad3a3c4862a Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Wed, 17 Apr 2024 15:23:08 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A(app-impress)=20rename=20PrintToPDF?= =?UTF-8?q?Button=20to=20PDFButton?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - rename PrintToPDFButton to PDFButton - rename button "Print the pad" to "Generate PDF" --- .../components/{PrintToPDFButton.tsx => PDFButton.tsx} | 10 +++++----- .../features/pads/pad-tools/components/PadToolBox.tsx | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) rename src/frontend/apps/impress/src/features/pads/pad-tools/components/{PrintToPDFButton.tsx => PDFButton.tsx} (89%) diff --git a/src/frontend/apps/impress/src/features/pads/pad-tools/components/PrintToPDFButton.tsx b/src/frontend/apps/impress/src/features/pads/pad-tools/components/PDFButton.tsx similarity index 89% rename from src/frontend/apps/impress/src/features/pads/pad-tools/components/PrintToPDFButton.tsx rename to src/frontend/apps/impress/src/features/pads/pad-tools/components/PDFButton.tsx index 66fb5138..0eecefdf 100644 --- a/src/frontend/apps/impress/src/features/pads/pad-tools/components/PrintToPDFButton.tsx +++ b/src/frontend/apps/impress/src/features/pads/pad-tools/components/PDFButton.tsx @@ -12,12 +12,12 @@ import { Template } from '@/features/templates/template'; import { useCreatePdf } from '../api/useCreatePdf'; import { downloadFile } from '../utils'; -interface PrintToPDFButtonProps { +interface PDFButtonProps { pad: Pad; templateId: Template['id']; } -const PrintToPDFButton = ({ pad, templateId }: PrintToPDFButtonProps) => { +const PDFButton = ({ pad, templateId }: PDFButtonProps) => { const { t } = useTranslation(); const [isFetching, setIsFetching] = useState(false); const { toast } = useToastProvider(); @@ -68,7 +68,7 @@ const PrintToPDFButton = ({ pad, templateId }: PrintToPDFButtonProps) => { createPdf({ templateId, body, - body_type: 'markdown', + body_type: 'html', }); } @@ -80,9 +80,9 @@ const PrintToPDFButton = ({ pad, templateId }: PrintToPDFButtonProps) => { }} disabled={isFetching} > - {t('Print the pad')} + {t('Generate PDF')} ); }; -export default PrintToPDFButton; +export default PDFButton; diff --git a/src/frontend/apps/impress/src/features/pads/pad-tools/components/PadToolBox.tsx b/src/frontend/apps/impress/src/features/pads/pad-tools/components/PadToolBox.tsx index eee318c7..304ba125 100644 --- a/src/frontend/apps/impress/src/features/pads/pad-tools/components/PadToolBox.tsx +++ b/src/frontend/apps/impress/src/features/pads/pad-tools/components/PadToolBox.tsx @@ -6,7 +6,7 @@ import { Box } from '@/components'; import { Pad } from '@/features/pads/pad'; import { TemplatesOrdering, useTemplates } from '@/features/templates'; -import PrintToPDFButton from './PrintToPDFButton'; +import PDFButton from './PDFButton'; interface PadToolBoxProps { pad: Pad; @@ -58,7 +58,7 @@ export const PadToolBox = ({ pad }: PadToolBoxProps) => { } /> {templateIdSelected && ( - + )} );