openreplay/frontend/app/dev/components/PromiseErrorButton.js
2021-05-01 15:12:01 +05:30

16 lines
No EOL
306 B
JavaScript

import React from 'react';
function fetchWrong() {
return fetch('/lalka_sasai').then(resp => resp.json());
}
export default function PromiseErrorButton() {
return (
<button
onClick={fetchWrong}
style={{background:'purple', color: 'white'}}
>
{"Zatrollit' lalku"}
</button>
);
}