Some checks failed
Anatid Blog CI Workflow / test (./frontend) (push) Failing after 32s
Anatid Blog CI Workflow / deploy (push) Has been skipped
Anatid Blog CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/anatid-blog-backend, ./backend) (push) Has been skipped
Anatid Blog CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/anatid-blog-frontend, ./frontend) (push) Has been skipped
Anatid Blog CI Workflow / test (./backend) (push) Successful in 27s
30 lines
664 B
TypeScript
30 lines
664 B
TypeScript
import React, { useEffect, useState } from 'react';
|
|
import axios from 'axios';
|
|
import logo from './logo.svg';
|
|
import './App.css';
|
|
|
|
function App() {
|
|
const [message, setMessage] = useState('');
|
|
|
|
useEffect(() => {
|
|
axios.get('http://anatid-web-backend:3000/')
|
|
.then(response => {
|
|
setMessage(response.data);
|
|
})
|
|
.catch(error => {
|
|
console.error('There was an error fetching the data.', error);
|
|
});
|
|
}, []);
|
|
|
|
return (
|
|
<div className="App">
|
|
<header className="App-header">
|
|
<img src={logo} className="App-logo" alt="logo" />
|
|
<p>{message}</p>
|
|
</header>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default App;
|