Added a lot of fixes #73

Merged
Ghost merged 12 commits from more-fixes into main 2024-01-26 00:25:58 +00:00
Showing only changes of commit ec67dd1bac - Show all commits

View File

@@ -14,11 +14,13 @@ export const ClientTableConfig = [
label: "End Point", label: "End Point",
render: (value: any) => { render: (value: any) => {
const onConsume = () => { const onConsume = () => {
fetch(value).then((response) => { fetch(value)
console.log(response) .then((response) => {
}).catch(error => { console.log(response);
console.log("Fetch error: ", error) })
}) .catch((error) => {
console.log("Fetch error: ", error);
});
}; };
return ( return (
<Button onClick={onConsume} variant="outlined"> <Button onClick={onConsume} variant="outlined">
@@ -89,11 +91,13 @@ export const ServiceTableConfig = [
const onButtonClick = (endpoint: string) => { const onButtonClick = (endpoint: string) => {
console.log("which endpoint comes here?", endpoint); console.log("which endpoint comes here?", endpoint);
fetch(endpoint).then((response) => { fetch(endpoint)
console.log(response); .then((response) => {
}).catch(error => { console.log(response);
console.log("Fetch error: ", error) })
}) .catch((error) => {
console.log("Fetch error: ", error);
});
}; };
if (!data) return <div>N/A</div>; if (!data) return <div>N/A</div>;