diff options
author | Nic Eigel <nic@eigel.ch> | 2024-03-09 22:57:37 +0100 |
---|---|---|
committer | Nic Eigel <nic@eigel.ch> | 2024-03-09 22:57:37 +0100 |
commit | c387e40bf6325198e0aa90d94c647e949dfe3f9b (patch) | |
tree | 0c884fb4f94d546f3735e20b00cee3f8aedd0c84 | |
parent | bd4ea95795c332f443f91c5737398d642f10b0ec (diff) | |
download | wallet-core-c387e40bf6325198e0aa90d94c647e949dfe3f9b.tar.gz wallet-core-c387e40bf6325198e0aa90d94c647e949dfe3f9b.tar.bz2 wallet-core-c387e40bf6325198e0aa90d94c647e949dfe3f9b.zip |
testing result
-rw-r--r-- | packages/auditor-backoffice-ui/src/index.tsx | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/packages/auditor-backoffice-ui/src/index.tsx b/packages/auditor-backoffice-ui/src/index.tsx index 4c5d0a89e..622d008a6 100644 --- a/packages/auditor-backoffice-ui/src/index.tsx +++ b/packages/auditor-backoffice-ui/src/index.tsx @@ -24,10 +24,6 @@ import { Fragment, VNode, h, render } from "preact"; function tryConfig(): Promise<AuditorBackend.Config> { - // const request: RequestInfo = new Request('./Config.json', { - // method: 'GET', - // headers: headers - // }) console.log("getting here"); const request: RequestInfo = new Request('http://localhost:8083/config', { method: 'GET' @@ -36,21 +32,21 @@ function tryConfig(): Promise<AuditorBackend.Config> { // the JSON body is taken from the response .then(res => res.json()) .then(res => { - // The response has an `any` type, so we need to cast - // it to the `User` type, and return it from the promise console.log(res); return res as AuditorBackend.Config; }); } -let test2; +var test2; let test = tryConfig().then(config => { - test2 = config.name; - console.log(config.name); + test2 = config; }); - +console.log(test); console.log(test2); -// Create your app -const app = h("h1", null, test2); +if (test2) { + console.log("now"); + const app = h("h1", null, test2); + + render(app, document.body); +} -render(app, document.body); |