generated from Luis/nextjs-python-web-template
fix formating
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user