mirror of
https://github.com/fluencelabs/examples
synced 2025-06-22 06:11:32 +00:00
Update all js-related examples to the latest version of JS SDK and Aqua compiler (#20)
This commit is contained in:
@ -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} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
@ -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";
|
||||
|
Reference in New Issue
Block a user