@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,30 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React, { useEffect, useState } from 'react';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import style from './app.module.css';
|
|
4
3
|
|
|
5
|
-
const
|
|
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;
|