Skip to content

Commit 97e0c8f

Browse files
committed
fix: build
1 parent 5a898df commit 97e0c8f

3 files changed

Lines changed: 296 additions & 270 deletions

File tree

packages/layout/src/text/emoji.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable no-console */
2+
13
import emojiRegex from 'emoji-regex-xs';
24
import resolveImage from '@react-pdf/image';
35
import { Fragment } from '@react-pdf/textkit';
@@ -57,7 +59,7 @@ export const fetchEmojis = (string: string, source?: EmojiSource) => {
5759
emojis[emoji].loading = false;
5860
emojis[emoji].data = image.data;
5961
})
60-
.catch(e) => {
62+
.catch((e) => {
6163
console.warn(e, 'Failed to load emoji image');
6264
emojis[emoji].loading = false;
6365
}),

packages/renderer/src/dom/PDFDownloadLink.js

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ import { forwardRef, useEffect } from 'react';
22

33
import usePDF from './usePDF';
44

5-
const PDFDownloadLinkBase = ({
6-
fileName = 'document.pdf',
7-
document: doc,
8-
children,
9-
onClick,
10-
href,
11-
...rest
12-
}, ref) => {
5+
const PDFDownloadLinkBase = (
6+
{
7+
fileName = 'document.pdf',
8+
document: doc,
9+
children,
10+
onClick,
11+
href,
12+
...rest
13+
},
14+
ref,
15+
) => {
1316
const [instance, updateInstance] = usePDF();
1417

1518
useEffect(() => updateInstance(doc), [doc]);
@@ -32,12 +35,18 @@ const PDFDownloadLinkBase = ({
3235
};
3336

3437
return (
35-
<a href={instance.url} download={fileName} onClick={handleClick} ref={ref} {...rest}>
38+
<a
39+
href={instance.url}
40+
download={fileName}
41+
onClick={handleClick}
42+
ref={ref}
43+
{...rest}
44+
>
3645
{typeof children === 'function' ? children(instance) : children}
3746
</a>
3847
);
3948
};
4049

41-
export const PDFDownloadLink = forwardRef(PDFDownloadLinkBase)
50+
export const PDFDownloadLink = forwardRef(PDFDownloadLinkBase);
4251

4352
export default PDFDownloadLink;

0 commit comments

Comments
 (0)