generated from Luis/nextjs-python-web-template
frontend #35
@@ -29,8 +29,16 @@ export default function AccessPoint() {
|
|||||||
.then((resp) =>
|
.then((resp) =>
|
||||||
resp.json().then((jsonData) => {
|
resp.json().then((jsonData) => {
|
||||||
console.log(jsonData);
|
console.log(jsonData);
|
||||||
|
|
||||||
|
const transformedData = jsonData.map((item) => ({
|
||||||
|
entity_name: item.service_name,
|
||||||
|
entity_did: item.entity_did,
|
||||||
|
network: item.network,
|
||||||
|
ip_address: "", // You might need to set an appropriate default value
|
||||||
|
}));
|
||||||
|
|
||||||
jsonData.length > 0
|
jsonData.length > 0
|
||||||
? setRepositoryData(jsonData)
|
? setRepositoryData(transformedData)
|
||||||
: setRepositoryData(APServiceRepositoryDummyData);
|
: setRepositoryData(APServiceRepositoryDummyData);
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user