-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Expand file tree
/
Copy pathApp.js
More file actions
44 lines (32 loc) · 824 Bytes
/
App.js
File metadata and controls
44 lines (32 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import logo from './logo.svg';
import './App.css';
function App() {
let generateText = async () => {
console.log("generate logo");
fetch("/generateBlog", {
method: "POST",
mode: "cors",
cache: "no-cache",
credentials: "same-origin",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"hey":"yo"
})
}).then(res=>{
console.log("Response", res)
})
}
// let generateLogo = async () => {
// }
return (
<div className="App">
<header className="App-header">
<button onClick={generateText}>Generate Blog</button>
{/* <button onClick={generateLogo}>Generate Logo</button> */}
</header>
</div>
);
}
export default App;