frontend #35

Merged
merge-bot merged 18 commits from frontend into main 2023-12-09 18:43:16 +00:00
2 changed files with 89 additions and 87 deletions
Showing only changes of commit d95c6ba981 - Show all commits

View File

@@ -15,24 +15,24 @@ export default function AccessPoint() {
const [repositoryData, setRepositoryData] = useState([]);
useEffect(() => {
fetch('http://localhost:2979/api/v1/get_repositories', {
method: 'GET',
fetch("http://localhost:2979/api/v1/get_repositories", {
method: "GET",
// credentials: 'include',
})
.then(resp => resp.json().then(jsonData => {
.then((resp) =>
resp.json().then((jsonData) => {
console.log(jsonData);
if (jsonData.length > 0) {
setRepositoryData(jsonData);
} else {
setRepositoryData(APServiceRepositoryDummyData);
}
}
))
}),
)
.then()
.catch()
.catch();
}, []);
return (
<div className="m-10">
<SummaryDetails

View File

@@ -16,37 +16,39 @@ export default function Client1() {
const [producerData, setProducerData] = useState([]);
useEffect(() => {
fetch('http://localhost:2979/api/v1/get_consumers', {
method: 'GET',
fetch("http://localhost:2979/api/v1/get_consumers", {
method: "GET",
// credentials: 'include',
})
.then(resp => resp.json().then(jsonData => {
.then((resp) =>
resp.json().then((jsonData) => {
console.log(jsonData);
if (jsonData.length > 0) {
setConsumerData(jsonData);
} else {
setConsumerData(Client1ConsumerData);
}
}
))
}),
)
.then()
.catch()
.catch();
fetch('http://localhost:2979/api/v1/get_producers', {
method: 'GET',
fetch("http://localhost:2979/api/v1/get_producers", {
method: "GET",
// credentials: 'include',
})
.then(resp => resp.json().then(jsonData => {
.then((resp) =>
resp.json().then((jsonData) => {
console.log(jsonData);
if (jsonData.length > 0) {
setProducerData(jsonData);
} else {
setProducerData(Client1ProducerData);
}
}
))
}),
)
.then()
.catch()
.catch();
}, []);
return (