diff --git a/pkgs/ui/src/app/access-point/page.tsx b/pkgs/ui/src/app/access-point/page.tsx index 25bac10..997f915 100644 --- a/pkgs/ui/src/app/access-point/page.tsx +++ b/pkgs/ui/src/app/access-point/page.tsx @@ -9,31 +9,31 @@ 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([]); + const [repositoryData, setRepositoryData] = useState([]); - useEffect(() => { - fetch('http://localhost:2979/api/v1/get_repositories', { - method: 'GET', - // credentials: 'include', - }) - .then(resp => resp.json().then(jsonData => { - console.log(jsonData); - if (jsonData.length > 0) { - setRepositoryData(jsonData); - } else { - setRepositoryData(APServiceRepositoryDummyData); - } - } - )) - .then() - .catch() - }, []); + useEffect(() => { + fetch("http://localhost:2979/api/v1/get_repositories", { + method: "GET", + // credentials: 'include', + }) + .then((resp) => + resp.json().then((jsonData) => { + console.log(jsonData); + if (jsonData.length > 0) { + setRepositoryData(jsonData); + } else { + setRepositoryData(APServiceRepositoryDummyData); + } + }), + ) + .then() + .catch(); + }, []); - - return ( + return (
{ - fetch('http://localhost:2979/api/v1/get_consumers', { - method: 'GET', - // credentials: 'include', - }) - .then(resp => resp.json().then(jsonData => { - console.log(jsonData); - if (jsonData.length > 0) { - setConsumerData(jsonData); - } else { - setConsumerData(Client1ConsumerData); - } - } - )) - .then() - .catch() + useEffect(() => { + fetch("http://localhost:2979/api/v1/get_consumers", { + method: "GET", + // credentials: 'include', + }) + .then((resp) => + resp.json().then((jsonData) => { + console.log(jsonData); + if (jsonData.length > 0) { + setConsumerData(jsonData); + } else { + setConsumerData(Client1ConsumerData); + } + }), + ) + .then() + .catch(); - fetch('http://localhost:2979/api/v1/get_producers', { - method: 'GET', - // credentials: 'include', - }) - .then(resp => resp.json().then(jsonData => { - console.log(jsonData); - if (jsonData.length > 0) { - setProducerData(jsonData); - } else { - setProducerData(Client1ProducerData); - } - } - )) - .then() - .catch() - }, []); + fetch("http://localhost:2979/api/v1/get_producers", { + method: "GET", + // credentials: 'include', + }) + .then((resp) => + resp.json().then((jsonData) => { + console.log(jsonData); + if (jsonData.length > 0) { + setProducerData(jsonData); + } else { + setProducerData(Client1ProducerData); + } + }), + ) + .then() + .catch(); + }, []); - return ( -
- -
-

Consumer View

- -
-
-

Producer View

- -
-
- ); + return ( +
+ +
+

Consumer View

+ +
+
+

Producer View

+ +
+
+ ); }