Selaa lähdekoodia

20230222: Started to check validator & nominator chain queries

mkbeefcake 1 vuosi sitten
vanhempi
commit
5936eacec9

+ 4 - 2
src/App.tsx

@@ -257,6 +257,8 @@ class App extends React.Component<IProps, IState> {
     ApiPromise.create({ provider/*, types*/ }).then(async (api) => {
       await api.isReady;
       console.log(`Connected to ${wsLocation}`);
+      debugger;
+      
       this.setState({ connected: true });
       this.updateWorkingGroups(api);
 
@@ -317,8 +319,8 @@ class App extends React.Component<IProps, IState> {
   }
 
   componentDidMount() {
-    // this.loadData(); // local storage + bootstrap
-    // this.joyApi(); // joystream rpc connection
+    this.loadData(); // local storage + bootstrap
+    this.joyApi(); // joystream rpc connection
     //this.initializeSocket() // jsstats socket.io
   }
 

+ 3 - 3
src/components/Dashboard/Proposals.tsx

@@ -25,7 +25,7 @@ const ProposalWorker = (props: {proposal: Proposal} ) => {
 	const { proposal } = props;
 
 	return (
-		<TableRow key={proposal.id}>
+		<TableRow key={`key-${proposal.id}`}>
 			<TableCell>{proposal.title}</TableCell>
 			<TableCell><i>{proposal.createdAt}</i></TableCell>
 			<TableCell>
@@ -78,8 +78,8 @@ const Proposals = (props: { council: ElectedCouncil | undefined}) => {
 								<TableBody>
 									{rowsPerPage > 0 ? 
 											proposals.slice(page * rowsPerPage, page *rowsPerPage + rowsPerPage)
-												.map((proposal) => <ProposalWorker proposal={proposal}/>)
-										: proposals.map((proposal) => <ProposalWorker proposal={proposal} />)
+												.map((proposal) => <ProposalWorker key={proposal.id} proposal={proposal}/>)
+										: proposals.map((proposal) => <ProposalWorker key={proposal.id} proposal={proposal} />)
 									}
 								</TableBody>
 							</>)}

+ 1 - 1
src/components/Dashboard/index.tsx

@@ -7,7 +7,7 @@ import Videos from "./Videos";
 import Forum from "./Forum";
 import Election from "./Election";
 import Validation from "./Validation";
-import WorkGroup from './WorkGroup';
+import WorkGroup from './Workgroup';
 
 import Banner from "./ui/Banner";
 import { useElectedCouncils } from '@/hooks';

+ 0 - 1
src/lib/queries.ts

@@ -12,7 +12,6 @@ export const queryJstats = (route: string) => {
 };
 
 export const getTokenomics = async (old?: Tokenomics) => {
-  debugger;
   if (old?.timestamp + 300000 > new Date()) return;
   console.debug(`Updating tokenomics`);
   let { data } = await axios.get("https://status.joystream.org/status");