Skip to content

Commit

Permalink
Fixed issues with #3 compilation - now fully successful
Browse files Browse the repository at this point in the history
  • Loading branch information
Gizmotronn committed Feb 26, 2022
1 parent f560392 commit b49a928
Show file tree
Hide file tree
Showing 7 changed files with 32,467 additions and 2,714 deletions.
26 changes: 13 additions & 13 deletions kinetikakoin-frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "kinetikakoin-frontend",
"name": "nft_game",
"version": "0.1.0",
"private": true,
"dependencies": {
"@openzeppelin/contracts": "^4.5.0",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.3",
"@testing-library/user-event": "^13.5.0",
"@openzeppelin/contracts": "^4.2.0",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-redux": "^7.2.6",
"react-scripts": "5.0.0",
"redux": "^4.1.2",
"redux-thunk": "^2.4.1",
"styled-components": "^5.3.3",
"web-vitals": "^2.1.4",
"web3": "^1.7.0"
"react-redux": "^7.2.4",
"react-scripts": "4.0.3",
"redux": "^4.1.1",
"redux-thunk": "^2.3.0",
"styled-components": "^5.3.0",
"web-vitals": "^1.0.1",
"web3": "^1.5.1"
},
"scripts": {
"start": "react-scripts start",
Expand All @@ -41,4 +41,4 @@
"last 1 safari version"
]
}
}
}
14 changes: 13 additions & 1 deletion kinetikakoin-frontend/src/App.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
import React, { useEffect } from "react";
import logo from './logo.svg';
import './App.css';
import { useDispatch, useSelector } from "react-redux";
import { connect } from "./redux/blockchain/blockchainActions";

function App() {
const dispatch = useDispatch();
const blockchain = useSelector(state => state.blockchain); // blockchain state defined in `redux/blockchain`

console.table(blockchain);

useEffect(() => {
dispatch(connect());
}, [dispatch]);

return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
Account: {blockchain.account}.
</p>
<a
className="App-link"
Expand Down
6 changes: 4 additions & 2 deletions kinetikakoin-frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import store from "./redux/store";
import { Provider } from "react-redux";

ReactDOM.render(
<React.StrictMode>
<Provider store={store}> {/* The entire app will have access to the redux state*/}
<App />
</React.StrictMode>,
</Provider>,
document.getElementById('root')
);

Expand Down
Loading

0 comments on commit b49a928

Please sign in to comment.