fix formating

This commit is contained in:
Arslan, Erdem
2023-12-02 18:48:08 +01:00
parent 0f8d4a431c
commit d95c6ba981
2 changed files with 89 additions and 87 deletions

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 (