[Functionality] Request Consumer / Producer

- request consumer, producer data for client-2
- refactored statements
This commit is contained in:
Onur Arslan
2023-12-02 21:12:04 +01:00
parent d95c6ba981
commit 2c098f4ba0
3 changed files with 41 additions and 21 deletions

View File

@@ -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()