From 46510287496b9f8bc349f5d59ab4640ae0ed03ff Mon Sep 17 00:00:00 2001 From: Paul Young Date: Wed, 20 Nov 2019 15:33:10 -0800 Subject: [PATCH] [WIP] Update new project files for JS user library SDK-643 --- .../new_project_files/src/hello/public/hello.js | 6 +++--- .../src/hello/public/index.html | 17 ++++++++--------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/dfx/assets/new_project_files/src/hello/public/hello.js b/dfx/assets/new_project_files/src/hello/public/hello.js index ffb5f2aaf2..41b1b193b2 100644 --- a/dfx/assets/new_project_files/src/hello/public/hello.js +++ b/dfx/assets/new_project_files/src/hello/public/hello.js @@ -1,6 +1,6 @@ -import { hello } from '../src/hello/main'; +import hello from '../../../canisters/hello/main.js'; window.hello = async function(name) { - const response = await hello.main(name); - console.log(response); + const reply = await hello.main(name); + document.getElementById('output').innerText = reply; }; diff --git a/dfx/assets/new_project_files/src/hello/public/index.html b/dfx/assets/new_project_files/src/hello/public/index.html index d8efba496f..361769a900 100644 --- a/dfx/assets/new_project_files/src/hello/public/index.html +++ b/dfx/assets/new_project_files/src/hello/public/index.html @@ -1,11 +1,10 @@ - - - - -
Press button, receive Hello!
- - -
- + + + + +
Press button, receive Hello!
+ +
+