🚚(app-impress) rename PrintToPDFButton to PDFButton

- rename PrintToPDFButton to PDFButton
- rename button "Print the pad" to "Generate PDF"
This commit is contained in:
Anthony LC
2024-04-17 15:23:08 +02:00
committed by Anthony LC
parent 5d6ae870fa
commit b687ad6974
2 changed files with 7 additions and 7 deletions

View File

@@ -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')}
</Button>
);
};
export default PrintToPDFButton;
export default PDFButton;

View File

@@ -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 && (
<PrintToPDFButton pad={pad} templateId={templateIdSelected} />
<PDFButton pad={pad} templateId={templateIdSelected} />
)}
</Box>
);