Skip to content

Commit e6a950c

Browse files
committed
a tag to prevent opening window
1 parent 681a676 commit e6a950c

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/components/OpenWithButton.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,15 @@ import ProcessingIcon from '../images/logo-processing.svg';
66
import * as css from './CopyButton.module.css';
77

88
const OpenWithButton = ({ text }) => {
9-
const openWithProcessing = () => {
10-
window.open('pde://sketch/base64/' + btoa(text));
11-
};
12-
139
return (
14-
<button
10+
<a
11+
href={`pde://sketch/base64/${btoa(text)}`}
1512
type="button"
1613
onClick={openWithProcessing}
1714
className={classnames(css.root)}
1815
>
1916
<ProcessingIcon /> {'Open With Processing'}
20-
</button>
17+
</a>
2118
)
2219
}
2320

0 commit comments

Comments
 (0)