Update all js-related examples to the latest version of JS SDK and Aqua compiler (#20)

This commit is contained in:
Pavel
2021-09-12 00:51:50 +03:00
committed by GitHub
parent 43a5e307f4
commit 37e848c9f5
87 changed files with 105592 additions and 40403 deletions

View File

@ -1,9 +1,10 @@
import { useRecoilValue } from "recoil";
import { clientState } from "../appState";
import { isConnectedState, selfPeerIdState } from "../appState";
import { TextWithLabel } from "./TextInput";
export const ConnectedInfo = () => {
const client = useRecoilValue(clientState);
const selfPeerId = useRecoilValue(selfPeerIdState);
const client = useRecoilValue(isConnectedState);
if (client === null) {
return <></>;
}
@ -11,8 +12,8 @@ export const ConnectedInfo = () => {
return (
<>
<h1>Connected</h1>
<TextWithLabel text={"Peer id:"} value={client.selfPeerId} />
<TextWithLabel text={"Relay peer id:"} value={client.selfPeerId} />
<TextWithLabel text={"Peer id:"} value={selfPeerId} />
<TextWithLabel text={"Relay peer id:"} value={selfPeerId} />
</>
);
};

View File

@ -1,4 +1,4 @@
import { useRecoilState, useRecoilValue } from "recoil";
import { useRecoilState } from "recoil";
import { useGetFileSize } from "../appLogic";
import { fileCIDState, rpcAddrState } from "../appState";
import { TextInput } from "./TextInput";