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

@@ -9,30 +9,30 @@ import {
APServiceRepositoryDummyData,
APServiceRepositoryTableConfig,
} from "@/mock/access_point";
import {useEffect, useState} from "react";
import { useEffect, useState } from "react";
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

@@ -9,44 +9,46 @@ import {
Client1ProducerData,
} from "@/mock/client_1";
import CustomTable from "@/components/table";
import {useEffect, useState} from "react";
import { useEffect, useState } from "react";
export default function Client1() {
const [consumerData, setConsumerData] = useState([]);
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 (