commit
This commit is contained in:
6
web/front-react/jsconfig.json
Normal file
6
web/front-react/jsconfig.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./src",
|
||||
"target": "ES6"
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"web-vitals": "^2.1.4"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"start": "cross-env NODE_PATH=src react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
|
||||
@@ -1,13 +1,25 @@
|
||||
import logo from './logo.svg';
|
||||
import { useEffect, useState } from 'react';
|
||||
import './App.css';
|
||||
import logo from './logo.svg';
|
||||
|
||||
function App() {
|
||||
|
||||
const [message, setMessage] = useState("");
|
||||
|
||||
useEffect(() => {
|
||||
fetch('/api/welcome')
|
||||
.then(response => response.text())
|
||||
.then(message => {
|
||||
setMessage(message);
|
||||
});
|
||||
},[])
|
||||
|
||||
return (
|
||||
<div className="App">
|
||||
<header className="App-header">
|
||||
<img src={logo} className="App-logo" alt="logo" />
|
||||
<p>
|
||||
Edit <code>src/App.js</code> and save to reload.
|
||||
{message}
|
||||
</p>
|
||||
<a
|
||||
className="App-link"
|
||||
|
||||
Reference in New Issue
Block a user