generated from Luis/nextjs-python-web-template
[Functionality] Request Consumer / Producer
- request consumer, producer data for client-2 - refactored statements
This commit is contained in:
@@ -22,11 +22,7 @@ export default function AccessPoint() {
|
||||
.then((resp) =>
|
||||
resp.json().then((jsonData) => {
|
||||
console.log(jsonData);
|
||||
if (jsonData.length > 0) {
|
||||
setRepositoryData(jsonData);
|
||||
} else {
|
||||
setRepositoryData(APServiceRepositoryDummyData);
|
||||
}
|
||||
jsonData.length > 0 ? setRepositoryData(jsonData) : setRepositoryData(APServiceRepositoryDummyData);
|
||||
}),
|
||||
)
|
||||
.then()
|
||||
|
||||
Reference in New Issue
Block a user