@equinor/echo-cli 0.20.0-beta-1 → 0.20.0-beta-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/echo-cli",
3
- "version": "0.20.0-beta-1",
3
+ "version": "0.20.0-beta-2",
4
4
  "description": "Command line interface for Echo Apps",
5
5
  "main": "dist/index.js",
6
6
  "source": "src/test.js",
@@ -1,30 +1,11 @@
1
- import EchoCore, { EchoEnv } from '@equinor/echo-core';
2
- import React, { useEffect, useState } from 'react';
1
+ import React from 'react';
3
2
  import style from './app.module.css';
4
3
 
5
- const baseApiUrl = EchoEnv.env().REACT_APP_API_URL;
6
-
7
- async function getVersion(): Promise<string> {
8
- const data = await EchoCore.EchoClient.fetch(`${baseApiUrl}/Version`);
9
- return await data.text();
10
- }
11
-
12
- const App: React.FC = (): JSX.Element => {
13
- const [echoVersion, setEchoVersion] = useState('');
14
-
15
- useEffect(() => {
16
- getVersion().then((version: string) => {
17
- setEchoVersion(version);
18
- });
19
- });
20
-
4
+ export const App: React.FC = (): JSX.Element => {
21
5
  return (
22
6
  <div className={style.wrapper}>
23
7
  <h1>Echo App Template</h1>
24
8
  <p>This is an app template for Echo Applications</p>
25
- <h6>Echo v{echoVersion}</h6>
26
9
  </div>
27
10
  );
28
11
  };
29
-
30
- export default App;
@@ -1,5 +1,5 @@
1
1
  import { EchoModuleApi } from '@equinor/echo-core';
2
- import App from './app';
2
+ import { App } from './app';
3
3
 
4
4
  export function setup(api: EchoModuleApi): void {
5
5
  api.registerApp(App);