Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Akim Mamedov committed Feb 21, 2024
1 parent 03fad74 commit 4ef9b11
Show file tree
Hide file tree
Showing 36 changed files with 26 additions and 2,987 deletions.
502 changes: 0 additions & 502 deletions web/package-lock.json

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@apollo/client": "^3.5.6",
"@auth0/auth0-react": "^1.8.0",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"@walletconnect/web3-provider": "^1.6.6",
"asn1.js": "^5.4.1",
"axios": "^0.24.0",
"bn.js": "^4.0.0",
"date-fns": "^2.28.0",
"ethereumjs-util": "^7.0.7",
"ethers": "^5.5.1",
"github-username-regex": "^1.0.0",
"graphql": "^16.1.0",
"keccak256": "^1.0.6",
"merkletreejs": "^0.2.27",
"nanoid": "^5.0.6",
Expand All @@ -31,8 +28,6 @@
"redux-persist": "^6.0.0",
"redux-thunk": "^2.4.0",
"safer-buffer": "^2.1.0",
"thegraph-react": "^1.0.0-alpha.1",
"walletlink": "^2.2.8",
"web-vitals": "^1.0.1",
"web3": "^1.6.1",
"web3modal": "^1.9.4"
Expand Down
55 changes: 16 additions & 39 deletions web/src/components/App/App.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { Routes, Route, useLocation, useNavigate, Navigate } from 'react-router-dom';
import { Navigate, Route, Routes, useLocation, useNavigate } from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux';
import { useEffect, useMemo, useState, memo } from 'react';
import {
Chains,
TheGraphProvider,
useCreateSubgraph
} from "thegraph-react";
import { memo, useEffect, useState } from 'react';

import './App.css';
import 'react-toastify/dist/ReactToastify.css';
Expand All @@ -19,22 +14,20 @@ import AccountNotFound from '../../pages/not-found-account-page/not-found-accoun
import FinishPage from '../../pages/finish-page/finish-page';
import ConnectWallet from '../ConnectWallet/ConnectWallet';
import { getNetworkName } from '../../store/actions/wallet';
import { ToastContainer, toast } from 'react-toastify';
import { toast, ToastContainer } from 'react-toastify';
import { useWeb3Connection } from '../../hooks/useWeb3Connection';
import { theGraphEndpoints } from '../../constants';
import { reduxCleanup } from '../../store/actions/common';
import {
ROUTE_INDEX,
ROUTE_WALLET,
ROUTE_CLAIMED,
ROUTE_CONNECT,
ROUTE_PROOF,
ROUTE_DONE,
ROUTE_FINISH,
ROUTE_INDEX,
ROUTE_NOT_FOUND,
ROUTE_CLAIMED
ROUTE_PROOF,
ROUTE_WALLET
} from '../../constants/routes'
import { catchError } from '../../utils';
import { setFluenceSubgraph, setDistributorSubgraph } from '../../store/actions/graph';
import { setCurrentRoute } from '../../store/actions/routes';
import { fetchCurrentAward, fetchMerkleRoot, fetchNextHalvePeriod } from '../../store/actions/distributor';
import { useVh } from '../../hooks/useVh';
Expand Down Expand Up @@ -83,20 +76,6 @@ function App() {
}
}, [address])

const fluence = useCreateSubgraph({
[Chains.KOVAN]: theGraphEndpoints.fluence['kovan'],
});

const distributor = useCreateSubgraph({
[Chains.KOVAN]: theGraphEndpoints.distributor['kovan'],
});

const subgraphs = useMemo(() => {
dispatch(setFluenceSubgraph(fluence))
dispatch(setDistributorSubgraph(distributor))
return [fluence, distributor];
}, [fluence, distributor]);

useEffect(() => {
window.scrollTo(0, 0)
dispatch(setCurrentRoute(location.pathname))
Expand All @@ -113,25 +92,23 @@ function App() {
}, [error])

return (
<TheGraphProvider chain={Chains.KOVAN} subgraphs={subgraphs}>
<div className="App">
<ToastContainer autoClose={false}/>
<Routes>
<Route exact path={ROUTE_INDEX} element={<PageBegin/>} />
<Route exact path={ROUTE_WALLET} element={<FirstStepPage/>} />
<Route exact path={ROUTE_CONNECT} element={<ConnectWallet />} />
<Route exact path={ROUTE_PROOF} element={<ProofPage/>} />
<Route exact path={ROUTE_DONE} element={<DonePage/>} />
<Route exact path={ROUTE_FINISH} element={<FinishPage />} />
<Route exact path={ROUTE_NOT_FOUND} element={<AccountNotFound />} />
<Route exact path={ROUTE_CLAIMED} element={<ClaimedPage />} />
<Route exact path={ROUTE_INDEX} element={<PageBegin/>}/>
<Route exact path={ROUTE_WALLET} element={<FirstStepPage/>}/>
<Route exact path={ROUTE_CONNECT} element={<ConnectWallet/>}/>
<Route exact path={ROUTE_PROOF} element={<ProofPage/>}/>
<Route exact path={ROUTE_DONE} element={<DonePage/>}/>
<Route exact path={ROUTE_FINISH} element={<FinishPage/>}/>
<Route exact path={ROUTE_NOT_FOUND} element={<AccountNotFound/>}/>
<Route exact path={ROUTE_CLAIMED} element={<ClaimedPage/>}/>
<Route
path="*"
element={<Navigate to="/" />}
element={<Navigate to="/"/>}
/>
</Routes>
</div>
</TheGraphProvider>
);
}

Expand Down
32 changes: 0 additions & 32 deletions web/src/components/ProposalsList/ProposalsList.js

This file was deleted.

61 changes: 0 additions & 61 deletions web/src/components/ProposalsList/ProposalsList.module.css

This file was deleted.

14 changes: 0 additions & 14 deletions web/src/components/TestSubgraph/TestSubgraph.js

This file was deleted.

53 changes: 0 additions & 53 deletions web/src/components/UserCard/UserCard.js

This file was deleted.

Loading

0 comments on commit 4ef9b11

Please sign in to comment.