tldraw/pages/create-error.tsx

16 lines
300 B
TypeScript
Raw Normal View History

2021-06-21 21:35:28 +00:00
export default function CreateError(): JSX.Element {
2021-06-19 09:08:38 +00:00
return (
<div>
<button
onClick={() => {
if (window.confirm('Cause an error?')) {
throw Error('You caused an error!')
}
}}
>
Create an Error
</button>
</div>
)
}