├── .gitignore
├── README.md
├── config-overrides.js
├── package-lock.json
├── package.json
├── public
├── assets
│ ├── chainLists
│ │ ├── arbitrum.png
│ │ ├── arbitrum.svg
│ │ ├── avalanche.svg
│ │ ├── avax.png
│ │ ├── avax.svg
│ │ ├── bsc.png
│ │ ├── bsc.svg
│ │ ├── ethereum.png
│ │ ├── ethereum.svg
│ │ ├── fantom.png
│ │ ├── fantom.svg
│ │ ├── matic.png
│ │ ├── matic.svg
│ │ ├── optimism.png
│ │ ├── optimism.svg
│ │ └── polygon.svg
│ ├── chains
│ │ ├── account.svg
│ │ ├── arbitrum.png
│ │ ├── arbitrum.svg
│ │ ├── avax.png
│ │ ├── avax.svg
│ │ ├── bsc.png
│ │ ├── bsc.svg
│ │ ├── eth.svg
│ │ ├── fantom.png
│ │ ├── fantom.svg
│ │ ├── matic.svg
│ │ ├── optimism.png
│ │ ├── optimism.svg
│ │ └── polygon.svg
│ ├── dao.jpg
│ ├── icons
│ │ ├── Icon awesome-twitter.svg
│ │ ├── analytics.svg
│ │ ├── aura.svg
│ │ ├── bal.svg
│ │ ├── beethovenx.svg
│ │ ├── chart.png
│ │ ├── chart.svg
│ │ ├── convex.svg
│ │ ├── crv.svg
│ │ ├── dash.svg
│ │ ├── discord.svg
│ │ ├── docs.svg
│ │ ├── gauge.svg
│ │ ├── home.svg
│ │ ├── layer1.svg
│ │ ├── liquidity.svg
│ │ ├── logo-lobbyist.svg
│ │ ├── logo.svg
│ │ ├── mirror.svg
│ │ ├── onx.svg
│ │ ├── pro-aave.svg
│ │ ├── pro-frax.svg
│ │ ├── pro-qidao.svg
│ │ ├── protocol.svg
│ │ ├── ribbon.svg
│ │ ├── saddle.svg
│ │ ├── twitter.svg
│ │ ├── user.svg
│ │ ├── vesq.svg
│ │ └── wall.svg
│ ├── images
│ │ └── logo.svg
│ ├── logo.png
│ ├── logo192.png
│ └── tokens
│ │ ├── aave.svg
│ │ ├── ape.svg
│ │ ├── arbitrum.png
│ │ ├── arbitrum.svg
│ │ ├── avax.png
│ │ ├── avax.svg
│ │ ├── bal.svg
│ │ ├── bifi.svg
│ │ ├── bsc.png
│ │ ├── bsc.svg
│ │ ├── busd.png
│ │ ├── comp.svg
│ │ ├── crv.svg
│ │ ├── cvx.svg
│ │ ├── dai.svg
│ │ ├── eth.png
│ │ ├── eth.svg
│ │ ├── eurs.png
│ │ ├── frax.svg
│ │ ├── ftm.png
│ │ ├── ftm.svg
│ │ ├── fxs.svg
│ │ ├── ghst.svg
│ │ ├── gmx.svg
│ │ ├── gns.png
│ │ ├── knc.svg
│ │ ├── ldo.svg
│ │ ├── link.svg
│ │ ├── logo.svg
│ │ ├── mai.png
│ │ ├── matic.svg
│ │ ├── mkr.svg
│ │ ├── op.png
│ │ ├── op.svg
│ │ ├── polygon.png
│ │ ├── polygon.svg
│ │ ├── qi.svg
│ │ ├── steth.svg
│ │ ├── sushi.svg
│ │ ├── uni.svg
│ │ ├── usdt.svg
│ │ └── wbtc.svg
├── favicon.ico
├── index.html
├── logo.svg
├── logo192.svg
├── manifest.json
└── robots.txt
├── readme
├── src
├── @types
│ ├── index.ts
│ ├── menuLink.ts
│ ├── proposal.ts
│ └── protocol.ts
├── App.tsx
├── assets
│ ├── chainLists
│ │ ├── arbitrum.png
│ │ ├── arbitrum.svg
│ │ ├── avalanche.svg
│ │ ├── avax.png
│ │ ├── avax.svg
│ │ ├── bsc.png
│ │ ├── bsc.svg
│ │ ├── ethereum.png
│ │ ├── ethereum.svg
│ │ ├── fantom.svg
│ │ ├── matic.png
│ │ ├── optimism.png
│ │ ├── optimism.svg
│ │ └── polygon.svg
│ ├── chains
│ │ ├── account.svg
│ │ ├── arbitrum.png
│ │ ├── arbitrum.svg
│ │ ├── avax.png
│ │ ├── avax.svg
│ │ ├── bsc.png
│ │ ├── bsc.svg
│ │ ├── eth.svg
│ │ ├── fantom.png
│ │ ├── fantom.svg
│ │ ├── matic.svg
│ │ ├── optimism.png
│ │ ├── optimism.svg
│ │ └── polygon.svg
│ ├── css
│ │ ├── app.css
│ │ ├── mycss.css
│ │ ├── nucleo-icons.css
│ │ └── nucleo-svg.css
│ ├── icons
│ │ ├── Icon awesome-twitter.svg
│ │ ├── analytics.svg
│ │ ├── aura.svg
│ │ ├── bal.svg
│ │ ├── beethovenx.svg
│ │ ├── chart.png
│ │ ├── chart.svg
│ │ ├── convex.svg
│ │ ├── crv.svg
│ │ ├── dash.svg
│ │ ├── discord.svg
│ │ ├── docs.svg
│ │ ├── gauge.svg
│ │ ├── home.svg
│ │ ├── layer1.svg
│ │ ├── liquidity.svg
│ │ ├── logo-lobbyist.svg
│ │ ├── logo.svg
│ │ ├── mirror.svg
│ │ ├── onx.svg
│ │ ├── pro-aave.svg
│ │ ├── pro-frax.svg
│ │ ├── pro-qidao.svg
│ │ ├── protocol.svg
│ │ ├── ribbon.svg
│ │ ├── saddle.svg
│ │ ├── twitter.svg
│ │ ├── user.svg
│ │ ├── vesq.svg
│ │ └── wall.svg
│ ├── loader.gif
│ ├── logo-lobbyist.svg
│ ├── logo.svg
│ └── tokens
│ │ ├── eth.svg
│ │ └── matic.svg
├── blockchain
│ └── index.ts
├── chainscan.ts
├── common
│ ├── colors.ts
│ ├── index.ts
│ ├── number.ts
│ ├── theme.ts
│ └── themeContext.tsx
├── components
│ ├── cardRewards
│ │ └── index.tsx
│ ├── form
│ │ ├── MultiChoiceForm
│ │ │ ├── MultiChoiceItem.tsx
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── formDataPreview
│ │ │ └── index.tsx
│ │ ├── formInputProps.ts
│ │ ├── formLabel.tsx
│ │ ├── formRangeSlider
│ │ │ └── index.tsx
│ │ ├── formRangeSliderInput
│ │ │ └── index.tsx
│ │ ├── formSelect
│ │ │ └── index.tsx
│ │ ├── formSelectPercent
│ │ │ └── index.tsx
│ │ ├── formSlider
│ │ │ └── index.tsx
│ │ ├── formSliderInput
│ │ │ └── index.tsx
│ │ ├── formTextArea
│ │ │ └── index.tsx
│ │ ├── formTextField
│ │ │ └── index.tsx
│ │ ├── index.ts
│ │ ├── outcomeChoiceForm
│ │ │ ├── ChoiceSelectItem.tsx
│ │ │ ├── FormSelect.tsx
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ └── styles.module.scss
│ ├── header
│ │ ├── index.tsx
│ │ ├── left.tsx
│ │ ├── styles.module.scss
│ │ └── switchchain.ts
│ ├── index.ts
│ ├── navBack
│ │ └── index.tsx
│ ├── pageHeader
│ │ ├── index.tsx
│ │ └── styles.module.scss
│ ├── proposal
│ │ ├── cardActive
│ │ │ └── index.tsx
│ │ ├── cardActiveSymbol
│ │ │ └── index.tsx
│ │ ├── cardCreated
│ │ │ └── index.tsx
│ │ ├── cardHeader
│ │ │ └── index.tsx
│ │ ├── cardTargetVotes
│ │ │ └── index.tsx
│ │ ├── cardVaultEmission
│ │ │ └── index.tsx
│ │ ├── cardVaultIncentive
│ │ │ └── index.tsx
│ │ ├── cardVaultPerVotes
│ │ │ └── index.tsx
│ │ ├── cardVaultReward
│ │ │ └── index.tsx
│ │ ├── cardWrappedMatic
│ │ │ └── index.tsx
│ │ └── index.ts
│ ├── reactApp.tsx
│ ├── sectionHeader
│ │ ├── index.tsx
│ │ └── styles.module.scss
│ ├── sidebarMenu
│ │ ├── index.tsx
│ │ ├── sidebarItem-Menu.scss
│ │ └── styles.module.scss
│ ├── tabs
│ │ ├── index.tsx
│ │ └── styles.module.scss
│ ├── text copy
│ │ ├── index.ts
│ │ ├── textContent
│ │ │ └── index.tsx
│ │ └── textHead
│ │ │ └── index.tsx
│ ├── text
│ │ ├── index.ts
│ │ ├── textContent
│ │ │ └── index.tsx
│ │ └── textHead
│ │ │ └── index.tsx
│ └── timeRemaining
│ │ ├── index.tsx
│ │ └── styles.module.scss
├── contracts
│ ├── contracts
│ │ ├── abis.json
│ │ ├── addresses.json
│ │ └── variableAddresses.json
│ └── index.ts
├── declaration.d.ts
├── gql
│ └── index.tsx
├── index.scss
├── index.tsx
├── pages
│ ├── NotPage.tsx
│ ├── home
│ │ └── index.tsx
│ ├── notpage.scss
│ ├── proposalNew
│ │ ├── index.tsx
│ │ └── partials
│ │ │ ├── common
│ │ │ ├── card
│ │ │ │ └── index.tsx
│ │ │ ├── index.ts
│ │ │ └── pageHeader
│ │ │ │ ├── breadCrumb.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── index.ts
│ │ │ ├── proposalConfirm
│ │ │ └── index.tsx
│ │ │ ├── proposalForm
│ │ │ └── index.tsx
│ │ │ ├── proposalKpi
│ │ │ └── index.tsx
│ │ │ ├── proposalPreview
│ │ │ └── index.tsx
│ │ │ ├── proposalType
│ │ │ └── index.tsx
│ │ │ └── protocolList
│ │ │ └── index.tsx
│ ├── proposalSymbol
│ │ ├── active.tsx
│ │ ├── index.tsx
│ │ └── symbols.json
│ ├── proposalSymbolVote
│ │ ├── index.tsx
│ │ ├── snapshotlink.ts
│ │ └── vote.scss
│ └── total
│ │ ├── analytics
│ │ ├── index.scss
│ │ └── index.tsx
│ │ ├── index.tsx
│ │ ├── proposals
│ │ ├── index.scss
│ │ ├── index.tsx
│ │ └── item.tsx
│ │ └── protocols
│ │ ├── index.scss
│ │ ├── index.tsx
│ │ ├── item.tsx
│ │ └── proposal.json
├── providerOptions
│ └── index.tsx
├── react-app-env.d.ts
├── redux
│ ├── rootReducer.ts
│ ├── slices
│ │ ├── chain.ts
│ │ ├── clickProposal.ts
│ │ ├── clickToken.ts
│ │ ├── proposal.ts
│ │ ├── provider.ts
│ │ └── wallet.ts
│ └── store.ts
├── reportWebVitals.ts
├── routes
│ └── index.tsx
├── services
│ └── index.ts
├── setupTests.ts
├── styles
│ ├── index.scss
│ ├── mixins
│ │ ├── _breakpoints.scss
│ │ └── _placeholder.scss
│ ├── objects
│ │ ├── elements.scss
│ │ ├── flex.scss
│ │ └── forms.scss
│ └── settings
│ │ └── globals.scss
├── token.ts
└── utils
│ └── index.tsx
├── tailwind.config.js
├── tsconfig.json
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .vscode
8 |
9 | # lingui
10 | /src/locales/**/*.js
11 | /src/locales/**/en.po
12 | /src/locales/_build/
13 |
14 | # testing
15 | /coverage
16 |
17 | # production
18 | /build
19 |
20 | # misc
21 | .DS_Store
22 | .env
23 | .env.local
24 | .env.development.local
25 | .env.test.local
26 | .env.production.local
27 |
28 | npm-debug.log*
29 | yarn-debug.log*
30 | yarn-error.log*
31 |
32 | package-lock.json
33 |
34 | .yarn/*
35 | !.yarn/patches
36 | !.yarn/plugins
37 | !.yarn/releases
38 | !.yarn/sdks
39 | !.yarn/versions
40 | /.idea/
41 |
--------------------------------------------------------------------------------
/config-overrides.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | // The function to use to create a webpack dev server configuration when running the development
3 | // server with 'npm run start' or 'yarn start'.
4 | // Example: set the dev server to use a specific certificate in https.
5 | devServer: function (configFunction) {
6 | // Return the replacement function for create-react-app to use to generate the Webpack
7 | // Development Server config. "configFunction" is the function that would normally have
8 | // been used to generate the Webpack Development server config - you can use it to create
9 | // a starting configuration to then modify instead of having to create a config from scratch.
10 | return function (proxy, allowedHost) {
11 | // Create the default config by calling configFunction with the proxy/allowedHost parameters
12 | const config = configFunction(proxy, allowedHost);
13 |
14 | config.headers = {
15 | 'Access-Control-Allow-Origin': '*',
16 | 'Access-Control-Allow-Methods': 'GET',
17 | 'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
18 | };
19 |
20 | // Return your customised Webpack Development Server config.
21 | return config;
22 | };
23 | },
24 | };
--------------------------------------------------------------------------------
/public/assets/chainLists/arbitrum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/chainLists/arbitrum.png
--------------------------------------------------------------------------------
/public/assets/chainLists/avalanche.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/public/assets/chainLists/avax.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/chainLists/avax.png
--------------------------------------------------------------------------------
/public/assets/chainLists/avax.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/public/assets/chainLists/bsc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/chainLists/bsc.png
--------------------------------------------------------------------------------
/public/assets/chainLists/bsc.svg:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/public/assets/chainLists/ethereum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/chainLists/ethereum.png
--------------------------------------------------------------------------------
/public/assets/chainLists/ethereum.svg:
--------------------------------------------------------------------------------
1 |
29 |
--------------------------------------------------------------------------------
/public/assets/chainLists/fantom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/chainLists/fantom.png
--------------------------------------------------------------------------------
/public/assets/chainLists/fantom.svg:
--------------------------------------------------------------------------------
1 |
22 |
--------------------------------------------------------------------------------
/public/assets/chainLists/matic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/chainLists/matic.png
--------------------------------------------------------------------------------
/public/assets/chainLists/matic.svg:
--------------------------------------------------------------------------------
1 |
17 |
--------------------------------------------------------------------------------
/public/assets/chainLists/optimism.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/chainLists/optimism.png
--------------------------------------------------------------------------------
/public/assets/chainLists/polygon.svg:
--------------------------------------------------------------------------------
1 |
20 |
--------------------------------------------------------------------------------
/public/assets/chains/account.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/public/assets/chains/arbitrum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/chains/arbitrum.png
--------------------------------------------------------------------------------
/public/assets/chains/avax.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/chains/avax.png
--------------------------------------------------------------------------------
/public/assets/chains/avax.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/public/assets/chains/bsc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/chains/bsc.png
--------------------------------------------------------------------------------
/public/assets/chains/bsc.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/public/assets/chains/eth.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/public/assets/chains/fantom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/chains/fantom.png
--------------------------------------------------------------------------------
/public/assets/chains/matic.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/public/assets/chains/optimism.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/chains/optimism.png
--------------------------------------------------------------------------------
/public/assets/chains/polygon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/dao.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/dao.jpg
--------------------------------------------------------------------------------
/public/assets/icons/Icon awesome-twitter.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/public/assets/icons/analytics.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/public/assets/icons/bal.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/icons/chart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/icons/chart.png
--------------------------------------------------------------------------------
/public/assets/icons/chart.svg:
--------------------------------------------------------------------------------
1 |
22 |
--------------------------------------------------------------------------------
/public/assets/icons/crv.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/icons/dash.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/public/assets/icons/discord.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/public/assets/icons/gauge.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/public/assets/icons/home.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/icons/layer1.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/public/assets/icons/liquidity.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/public/assets/icons/logo-lobbyist.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/public/assets/icons/mirror.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/public/assets/icons/onx.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/public/assets/icons/pro-aave.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/public/assets/icons/pro-frax.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/public/assets/icons/protocol.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/public/assets/icons/twitter.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/public/assets/icons/user.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/public/assets/icons/vesq.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/public/assets/icons/wall.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/public/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/logo.png
--------------------------------------------------------------------------------
/public/assets/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/logo192.png
--------------------------------------------------------------------------------
/public/assets/tokens/aave.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/tokens/arbitrum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/tokens/arbitrum.png
--------------------------------------------------------------------------------
/public/assets/tokens/avax.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/tokens/avax.png
--------------------------------------------------------------------------------
/public/assets/tokens/avax.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/public/assets/tokens/bal.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/tokens/bsc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/tokens/bsc.png
--------------------------------------------------------------------------------
/public/assets/tokens/bsc.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/public/assets/tokens/busd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/tokens/busd.png
--------------------------------------------------------------------------------
/public/assets/tokens/comp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/tokens/crv.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/tokens/dai.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/tokens/eth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/tokens/eth.png
--------------------------------------------------------------------------------
/public/assets/tokens/eth.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/public/assets/tokens/eurs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/tokens/eurs.png
--------------------------------------------------------------------------------
/public/assets/tokens/ftm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/tokens/ftm.png
--------------------------------------------------------------------------------
/public/assets/tokens/ftm.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/public/assets/tokens/ghst.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
24 |
--------------------------------------------------------------------------------
/public/assets/tokens/gns.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/tokens/gns.png
--------------------------------------------------------------------------------
/public/assets/tokens/knc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/tokens/link.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/tokens/logo.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/public/assets/tokens/mai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/tokens/mai.png
--------------------------------------------------------------------------------
/public/assets/tokens/matic.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/tokens/mkr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/tokens/op.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/tokens/op.png
--------------------------------------------------------------------------------
/public/assets/tokens/polygon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/assets/tokens/polygon.png
--------------------------------------------------------------------------------
/public/assets/tokens/polygon.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/public/assets/tokens/sushi.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/tokens/usdt.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/assets/tokens/wbtc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
21 |
22 | Lobbyist
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "Lobbyist",
3 | "name": "Lobbyist",
4 | "description": "For all proposals",
5 | "providedBy": {
6 | "name": "Lobbyist",
7 | "url": "https://lobbyist.vote/"
8 | },
9 | "iconPath": "images/logos/logo192.svg",
10 | "start_url": ".",
11 | "display": "standalone",
12 | "theme_color": "#000000",
13 | "background_color": "#ffffff"
14 | }
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/readme:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/@types/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./menuLink";
2 |
--------------------------------------------------------------------------------
/src/@types/menuLink.ts:
--------------------------------------------------------------------------------
1 | import { type } from "os";
2 | import { NumericKeys } from "react-hook-form/dist/types/path/common";
3 |
4 | interface chainChild {
5 | icon: any,
6 | text: string,
7 | href: string,
8 | chain: number
9 | }
10 | interface chains {
11 | name: string;
12 | id: number;
13 | }
14 |
15 | export interface MenuLink {
16 | icon: any;
17 | text: string;
18 | href: string;
19 | chain?: number;
20 | type?: string;
21 | childtype?: boolean;
22 | separator?: boolean;
23 | child?: chainChild[]
24 | }
25 |
26 | export interface Protocols {
27 | protocol: string;
28 | text: string;
29 | href: string;
30 | chains: chains[];
31 | icon: string;
32 | multiChain: boolean;
33 | chainNames: string;
34 | }
35 |
36 | export type Network = {
37 | name: string;
38 | short_name: string;
39 | chain: string;
40 | network: string;
41 | network_id: number;
42 | chain_id: string;
43 | providers: string[];
44 | rpc_url: string;
45 | block_explorer: string;
46 | hub_sort_order?: number;
47 | };
--------------------------------------------------------------------------------
/src/@types/proposal.ts:
--------------------------------------------------------------------------------
1 | import { Protocol } from "./protocol";
2 |
3 | export type Matic = {
4 | total: number;
5 | votes: number;
6 | amount: number;
7 | };
8 |
9 | export type Proposal = {
10 | type: string;
11 | name: string;
12 | description: string;
13 | protocol: string;
14 | isClosed: boolean;
15 | reward: number;
16 | rewardCurrency: string;
17 | address: string;
18 | proposalId: string;
19 | totalVoteWeight: number;
20 | poolId: number;
21 | proposalType: string;
22 | minVotes: number;
23 | targetVotes: number;
24 | myvoteAmount: number;
25 | myclaim: boolean;
26 | usdAmount: number;
27 | chain: string;
28 | choice: string;
29 | };
30 |
31 | export type NewProposal = {
32 | proposalId: string,
33 | name: string,
34 | description: string,
35 | platformType: string,
36 | outcome: string,
37 | rewardCurrency: string,
38 | rewardAmount: number,
39 | creator: string,
40 | isClosed: boolean,
41 | paybackAmount: number
42 | }
43 |
44 | export type History = {
45 | type: string;
46 | chain: any;
47 | rewardCurrency: string;
48 | address: string;
49 | }
50 |
51 | export enum EnumProposalType {
52 | gauge = "Gauge",
53 | governance = "Governance",
54 | }
55 |
56 | export enum EnumProposalKpi {
57 | fixed = "Fixed",
58 | variable = "Variable",
59 | }
60 |
61 | export type ProposalState = {
62 | activeProposals: Proposal[];
63 | historyProposals: Proposal[];
64 | currentProposal: Proposal[];
65 | };
66 |
--------------------------------------------------------------------------------
/src/@types/protocol.ts:
--------------------------------------------------------------------------------
1 | export type Protocol = {
2 | name: EnumProtocolName;
3 | symbol: ProtocolSymbol;
4 | };
5 |
6 | export type ProtocolSymbol = "qidao" | "aave" | "aurafinance" | "beets" | "saddlefinance" | "onx" | "ribbon" | "vesqdao";
7 |
8 | export enum EnumProtocolName {
9 | qidao = "QiDAO",
10 | aave = "Aave",
11 | aurafinance = "Aura",
12 | beets = "Beethovenx",
13 | saddlefinance = "Saddle",
14 | onx = "OnX",
15 | ribbon = "Ribbon",
16 | proposal = "Proposals",
17 | protocols = "Protocols",
18 | analytics = "Analytics",
19 | vesqdao = "VESQ",
20 | }
21 |
22 | export enum EnumProtocolSymbolName {
23 | qidao = "Qi",
24 | aave = "Aave",
25 | }
26 |
27 | export const ProtocolsList: Protocol[] = [
28 | { name: EnumProtocolName.qidao, symbol: "qidao" },
29 | { name: EnumProtocolName.aave, symbol: "aave" },
30 | { name: EnumProtocolName.aurafinance, symbol: "aurafinance" },
31 | { name: EnumProtocolName.beets, symbol: "beets" },
32 | { name: EnumProtocolName.saddlefinance, symbol: "saddlefinance" },
33 | { name: EnumProtocolName.onx, symbol: "onx" },
34 | { name: EnumProtocolName.ribbon, symbol: "ribbon" },
35 | { name: EnumProtocolName.vesqdao, symbol: "vesqdao" },
36 | ];
37 |
--------------------------------------------------------------------------------
/src/assets/chainLists/arbitrum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/src/assets/chainLists/arbitrum.png
--------------------------------------------------------------------------------
/src/assets/chainLists/avalanche.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/src/assets/chainLists/avax.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/src/assets/chainLists/avax.png
--------------------------------------------------------------------------------
/src/assets/chainLists/avax.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/src/assets/chainLists/bsc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/src/assets/chainLists/bsc.png
--------------------------------------------------------------------------------
/src/assets/chainLists/ethereum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/src/assets/chainLists/ethereum.png
--------------------------------------------------------------------------------
/src/assets/chainLists/ethereum.svg:
--------------------------------------------------------------------------------
1 |
29 |
--------------------------------------------------------------------------------
/src/assets/chainLists/fantom.svg:
--------------------------------------------------------------------------------
1 |
22 |
--------------------------------------------------------------------------------
/src/assets/chainLists/matic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/src/assets/chainLists/matic.png
--------------------------------------------------------------------------------
/src/assets/chainLists/optimism.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/src/assets/chainLists/optimism.png
--------------------------------------------------------------------------------
/src/assets/chainLists/polygon.svg:
--------------------------------------------------------------------------------
1 |
20 |
--------------------------------------------------------------------------------
/src/assets/chains/account.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/chains/arbitrum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/src/assets/chains/arbitrum.png
--------------------------------------------------------------------------------
/src/assets/chains/avax.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/src/assets/chains/avax.png
--------------------------------------------------------------------------------
/src/assets/chains/avax.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/src/assets/chains/bsc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/src/assets/chains/bsc.png
--------------------------------------------------------------------------------
/src/assets/chains/bsc.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/src/assets/chains/eth.svg:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/src/assets/chains/fantom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/src/assets/chains/fantom.png
--------------------------------------------------------------------------------
/src/assets/chains/fantom.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/chains/matic.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/chains/optimism.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/src/assets/chains/optimism.png
--------------------------------------------------------------------------------
/src/assets/chains/polygon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/css/nucleo-svg.css:
--------------------------------------------------------------------------------
1 | .icon{display:inline-block;color:#111;height:1em;width:1em}.icon use{fill:#7ea6f6}.icon.icon-outline use{stroke:#7ea6f6}.icon-xs{height:.5em;width:.5em}.icon-sm{height:.8em;width:.8em}.icon-lg{height:1.6em;width:1.6em}.icon-xl{height:2em;width:2em}.icon-text-aligner{display:flex;align-items:center}.icon-text-aligner .icon{color:inherit;margin-right:.4em}.icon-text-aligner .icon use{color:inherit;fill:currentColor}.icon-text-aligner .icon.icon-outline use{stroke:currentColor}.icon{fill:currentColor;stroke:none}.icon.icon-outline{fill:none;stroke:currentColor}.icon use{stroke:none}.icon.icon-outline use{fill:none}.icon-outline.icon-stroke-1{stroke-width:1px}.icon-outline.icon-stroke-2{stroke-width:2px}.icon-outline.icon-stroke-3{stroke-width:3px}.icon-outline.icon-stroke-4{stroke-width:4px}.icon-outline.icon-stroke-1 use,.icon-outline.icon-stroke-3 use{-webkit-transform:translateX(0.5px) translateY(0.5px);-moz-transform:translateX(0.5px) translateY(0.5px);-ms-transform:translateX(0.5px) translateY(0.5px);-o-transform:translateX(0.5px) translateY(0.5px);transform:translateX(0.5px) translateY(0.5px)}
--------------------------------------------------------------------------------
/src/assets/icons/Icon awesome-twitter.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/analytics.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/src/assets/icons/bal.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/icons/chart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/src/assets/icons/chart.png
--------------------------------------------------------------------------------
/src/assets/icons/chart.svg:
--------------------------------------------------------------------------------
1 |
22 |
--------------------------------------------------------------------------------
/src/assets/icons/crv.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/icons/dash.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/src/assets/icons/discord.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/src/assets/icons/gauge.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/src/assets/icons/home.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/icons/layer1.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/src/assets/icons/liquidity.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/icons/mirror.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/src/assets/icons/onx.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/icons/pro-aave.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/src/assets/icons/pro-frax.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/src/assets/icons/protocol.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/src/assets/icons/twitter.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/src/assets/icons/user.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/src/assets/icons/vesq.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/src/assets/icons/wall.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/src/assets/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/newstable/lobbyist-ui/b1ea0243aeb608f34678b4dc843df03aa4f0fc1f/src/assets/loader.gif
--------------------------------------------------------------------------------
/src/assets/logo-lobbyist.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/src/assets/logo.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/src/assets/tokens/eth.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/tokens/matic.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/chainscan.ts:
--------------------------------------------------------------------------------
1 | const Chainscan: any = {
2 | "1": "https://etherscan.io/address/",
3 | "10": "https://optimistic.etherscan.io/address/",
4 | "56": "https://bscscan.com/address/",
5 | "137": "https://polygonscan.com/address/",
6 | "250": "https://ftmscan.com/address/",
7 | "42161": "https://arbiscan.io/address/",
8 | "43114": "https://avascan.info/blockchain/all/address/"
9 | }
10 |
11 | export { Chainscan }
--------------------------------------------------------------------------------
/src/common/colors.ts:
--------------------------------------------------------------------------------
1 | const colors = {
2 | white: "#fff",
3 | black: "#282931",
4 | blackGray: "#1f2028",
5 | charcoalGray: "#1E212D",
6 | slateGray: "#2D3242",
7 | darkGray: "#393939",
8 | lightGray: "#c4c4c44a",
9 | textGray: "#8a8a8a",
10 | textGrayLight: "#969696",
11 | maroon: "#e03b766b",
12 | pink: "#e03b76",
13 | teal: "#226B80",
14 | tealLight: "#3a78ff",
15 | // maroon: "#8f4d68",
16 | purple: "#9747FF",
17 | purpleMatt: "#723F8A",
18 | success: "#3BE069",
19 | };
20 |
21 | export { colors };
22 |
--------------------------------------------------------------------------------
/src/common/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./theme";
2 | export * from "./colors";
3 |
--------------------------------------------------------------------------------
/src/common/number.ts:
--------------------------------------------------------------------------------
1 | const NumberType = (num: string, count: number) => {
2 | var decimal = Number(num) - Math.floor(Number(num));
3 | var decimalstr = decimal.toFixed(count).slice(1, decimal.toString().length);
4 | const data = (Number(num) - decimal).toString();
5 | var str = "";
6 | var count = Math.floor(data.length / 3);
7 | if (data.length / 3 - count == 0) {
8 | count--;
9 | }
10 | if (count == 0) {
11 | str = data.slice(-3) + decimalstr;
12 | return str;
13 | }
14 | // if(count ==0)
15 | for (var i = 0; i < count; i++) {
16 | if (i == 0) {
17 | str = "," + data.slice(-3);
18 | } else {
19 | str = "," + data.slice(-(i + 1) * 3, -i * 3) + str;
20 | }
21 | }
22 | str = data.slice(-(count + 1) * 3, -count * 3) + str + decimalstr;
23 | return str;
24 | }
25 |
26 | export default NumberType;
--------------------------------------------------------------------------------
/src/components/form/MultiChoiceForm/MultiChoiceItem.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from "react";
2 | import { Box, Button, Typography } from "@mui/material";
3 | import CheckOutlinedIcon from '@mui/icons-material/CheckOutlined';
4 | import CloseOutlinedIcon from '@mui/icons-material/CloseOutlined';
5 |
6 | const NA = ['st', 'nd', 'rd', 'th'];
7 | const MultiChoiceItem = (props: any) => {
8 | const { voteOption, actived, Index, VoteType, ClickEvent } = props;
9 | return (
10 | { ClickEvent(voteOption.value); }}>
12 |
13 | {VoteType !== 'ranked-choice' && actived && }
14 | {VoteType === 'ranked-choice' && actived ? `(${Index + 1}${Index >= 0 && Index < 4 ? NA[Index] : 'th'})` : ''}
15 |
16 |
17 |
18 | {voteOption.display}
19 |
20 |
21 |
22 | {actived && }
23 |
24 |
25 | );
26 | };
27 |
28 | export { MultiChoiceItem };
29 |
30 |
--------------------------------------------------------------------------------
/src/components/form/MultiChoiceForm/index.scss:
--------------------------------------------------------------------------------
1 | .Multi-choice-item {
2 | height: 50px;
3 | border-color: #636369;
4 |
5 | flex-direction: column;
6 | align-items: center;
7 | justify-content: space-between;
8 | }
9 |
10 | .active-item {
11 | border-color: white;
12 | }
--------------------------------------------------------------------------------
/src/components/form/formDataPreview/index.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | FormControl,
3 | FormLabel,
4 | StyledEngineProvider,
5 | Typography,
6 | } from "@mui/material";
7 |
8 | type Props = {
9 | label?: string;
10 | value?: string;
11 | };
12 |
13 | const FormDataPreview = ({ label, value }: Props) => {
14 | return (
15 |
16 |
17 | {label}
18 | {value}
19 |
20 |
21 |
22 | );
23 | };
24 |
25 | FormDataPreview.defaultProps = {
26 | label: "",
27 | };
28 |
29 | export { FormDataPreview };
30 |
--------------------------------------------------------------------------------
/src/components/form/formInputProps.ts:
--------------------------------------------------------------------------------
1 | export interface FormInputProps {
2 | name: string;
3 | control: any;
4 | setValue?: any;
5 | rules?: object;
6 | index?: number;
7 | helpText?: string;
8 | label?: string;
9 | defaultValue?: any;
10 | placeholder?: string;
11 | }
12 |
--------------------------------------------------------------------------------
/src/components/form/formLabel.tsx:
--------------------------------------------------------------------------------
1 | import { Typography, Box, Tooltip } from "@mui/material";
2 | import InfoIcon from "@mui/icons-material/Info";
3 |
4 | interface Props {
5 | label?: string;
6 | helpText?: string;
7 | }
8 |
9 | const FormLabel = ({ label, helpText }: Props) => {
10 | return (
11 |
12 |
13 | {label}
14 |
15 | {helpText && (
16 |
17 |
18 |
19 | )}
20 |
21 | );
22 | };
23 |
24 | FormLabel.defaultProps = {
25 | label: "",
26 | helpText: "",
27 | };
28 |
29 | export { FormLabel };
30 |
--------------------------------------------------------------------------------
/src/components/form/formRangeSlider/index.tsx:
--------------------------------------------------------------------------------
1 | import { FormControl, StyledEngineProvider, Box, Slider } from "@mui/material";
2 | import { Controller } from "react-hook-form";
3 | import { FormInputProps } from "../formInputProps";
4 | import { FormLabel } from "../formLabel";
5 |
6 | interface Props extends FormInputProps {
7 | valueLabelFormat?: (value: number, index: number) => string;
8 | }
9 |
10 | const FormRangeSlider = ({
11 | label,
12 | name,
13 | control,
14 | rules,
15 | index,
16 | helpText,
17 | valueLabelFormat,
18 | setValue,
19 | }: Props) => {
20 | return (
21 |
22 |
23 |
24 |
25 | {
30 | let sliderVal = [];
31 | if (typeof index !== "undefined" && Array.isArray(value)) {
32 | sliderVal = value[index].value;
33 | }
34 | return (
35 | "Default"}
37 | defaultValue={sliderVal}
38 | ref={ref}
39 | onChange={(event: Event, newValue: number | number[]) => {
40 | // setValue && setValue(newValue);
41 | onChange(newValue);
42 | }}
43 | valueLabelDisplay="auto"
44 | valueLabelFormat={valueLabelFormat}
45 | />
46 | );
47 | }}
48 | />
49 |
50 |
51 |
52 | );
53 | };
54 |
55 | FormRangeSlider.defaultProps = {
56 | label: "",
57 | placeholder: "",
58 | };
59 |
60 | export { FormRangeSlider };
61 |
--------------------------------------------------------------------------------
/src/components/form/formSlider/index.tsx:
--------------------------------------------------------------------------------
1 | import { FormControl, StyledEngineProvider, Box, Slider } from "@mui/material";
2 | import { Controller } from "react-hook-form";
3 | import { FormInputProps } from "../formInputProps";
4 | import { FormLabel } from "../formLabel";
5 |
6 | interface Props extends FormInputProps {
7 | valueLabelFormat?: (value: number, index: number) => string;
8 | }
9 |
10 | const FormSlider = ({
11 | label,
12 | name,
13 | control,
14 | rules,
15 | index,
16 | helpText,
17 | valueLabelFormat,
18 | }: Props) => {
19 | return (
20 |
21 |
22 |
23 |
24 | {
29 | let sliderVal = value;
30 | if (typeof index !== "undefined" && Array.isArray(value)) {
31 | sliderVal = value[index].value;
32 | }
33 | return (
34 | "Default"}
36 | value={sliderVal}
37 | ref={ref}
38 | onChange={onChange}
39 | valueLabelDisplay="auto"
40 | valueLabelFormat={valueLabelFormat}
41 | />
42 | );
43 | }}
44 | />
45 |
46 |
47 |
48 | );
49 | };
50 |
51 | FormSlider.defaultProps = {
52 | label: "",
53 | placeholder: "",
54 | };
55 |
56 | export { FormSlider };
57 |
--------------------------------------------------------------------------------
/src/components/form/formTextArea/index.tsx:
--------------------------------------------------------------------------------
1 | import { FormControl, StyledEngineProvider, TextField } from "@mui/material";
2 | import { Controller } from "react-hook-form";
3 | import classNames from "classnames";
4 | import { FormInputProps } from "../formInputProps";
5 | import { FormLabel } from "../formLabel";
6 | import styles from "../styles.module.scss";
7 |
8 | interface Props extends FormInputProps {}
9 |
10 | const FormTextArea = ({
11 | label,
12 | helpText,
13 | name,
14 | control,
15 | rules,
16 | index,
17 | placeholder,
18 | }: Props) => {
19 | return (
20 |
21 |
22 |
23 | {
32 | let txtValue = value;
33 | if (typeof index !== "undefined" && Array.isArray(value)) {
34 | txtValue = value[index].value;
35 | }
36 | return (
37 |
48 | );
49 | }}
50 | />
51 |
52 |
53 | );
54 | };
55 |
56 | FormTextArea.defaultProps = {
57 | label: "",
58 | placeholder: "",
59 | };
60 |
61 | export { FormTextArea };
62 |
--------------------------------------------------------------------------------
/src/components/form/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./formTextField";
2 | export * from "./formTextArea";
3 | export * from "./formSelect";
4 | export * from "./formSlider";
5 | export * from "./formSliderInput";
6 | export * from "./formRangeSlider";
7 | export * from "./formRangeSliderInput";
8 | export * from "./formDataPreview";
9 |
10 | export * from './outcomeChoiceForm';
11 | export * from './MultiChoiceForm';
12 |
--------------------------------------------------------------------------------
/src/components/form/outcomeChoiceForm/FormSelect.tsx:
--------------------------------------------------------------------------------
1 | import { FormControl, StyledEngineProvider, Select, MenuItem } from "@mui/material";
2 | import styles from "../styles.module.scss";
3 | import classNames from "classnames";
4 | import { useEffect, useState } from "react";
5 |
6 | const FormSelect = (props: any) => {
7 | const { items, changeEvent } = props;
8 | return (
9 |
10 |
11 |
29 |
30 |
31 | )
32 | }
33 |
34 | export { FormSelect };
--------------------------------------------------------------------------------
/src/components/form/outcomeChoiceForm/index.scss:
--------------------------------------------------------------------------------
1 | .outcome-input {
2 | width: 100%;
3 | height: 100%;
4 | background-color: #282931;
5 | color: white;
6 |
7 | border: none;
8 | outline: none;
9 | text-align: center;
10 |
11 | &::after,
12 | &::before,
13 | &:focus {
14 | --tw-ring-shadow: none !important;
15 | }
16 |
17 | &::-webkit-inner-spin-button,
18 | &::-webkit-outer-spin-button {
19 | -webkit-appearance: none;
20 | margin: 0;
21 | }
22 | }
23 |
24 | .options-delete-btn {
25 | &:hover {
26 | color: rgb(216, 114, 19);
27 | }
28 | }
29 |
30 | .hidden-input {
31 | position: absolute;
32 | z-index: -1;
33 | }
--------------------------------------------------------------------------------
/src/components/form/styles.module.scss:
--------------------------------------------------------------------------------
1 | @use "../../styles/index.scss" as main;
2 |
3 | .input {
4 | background-color: #1f2028;
5 |
6 | :focus {
7 | outline: white !important;
8 | border-color: white !important;
9 | --tw-ring-shadow: inherit !important;
10 | }
11 |
12 | img {
13 | display: inline;
14 | width: 18px;
15 | height: 18px;
16 | margin-right: 3px;
17 | }
18 | }
19 |
20 | .menu {
21 | &Item {
22 | background-color: rgb(84, 90, 95);
23 |
24 | img {
25 | width: 18px;
26 | height: 18px;
27 | margin-right: 3px;
28 | }
29 |
30 | &:hover,
31 | &:focus {
32 | outline: 0;
33 | background-color: rgb(66, 73, 79) !important;
34 | }
35 | }
36 |
37 | }
--------------------------------------------------------------------------------
/src/components/header/styles.module.scss:
--------------------------------------------------------------------------------
1 | @use "../../styles/index.scss" as main;
2 |
3 | .main {
4 | padding: 25px 0;
5 | }
6 |
7 | .icon {
8 | @extend %topIcon;
9 | background-color: transparent !important;
10 |
11 | &Gauge {
12 | color: main.$var-clr-white;
13 | }
14 |
15 | &Add {
16 | fill: main.$var-clr-white !important;
17 | }
18 |
19 | &Symbol {
20 | background: #c4c4c4;
21 |
22 | svg {
23 | background: transparent;
24 | color: #111314;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/src/components/header/switchchain.ts:
--------------------------------------------------------------------------------
1 | import { toHex, truncateAddress } from "../../utils";
2 | import { setChainName } from "../../redux/slices/chain";
3 | import { dispatch } from "../../redux/store";
4 |
5 |
6 |
7 | const switchNetwork = async (network: string, library: any, chain: string) => {
8 | try {
9 | await library.provider.request({
10 | method: "wallet_switchEthereumChain",
11 | params: [{ chainId: toHex(network) }],
12 | });
13 | dispatch(setChainName(network));
14 | return true;
15 | } catch (switchError: any) {
16 | dispatch(setChainName(chain));
17 | if (switchError.code === 4902) {
18 | try {
19 | await library.provider.request({
20 | method: "wallet_addEthereumChain",
21 | params: [
22 | {
23 | chainId: toHex("1"),
24 | chainName: "Ethereum",
25 | rpcUrls: ["https://mainnet.infura.io/v3/"],
26 | blockExplorerUrls: ["https://etherscan.io"],
27 | },
28 | ],
29 | });
30 | } catch (addError) {
31 | throw addError;
32 | }
33 | }
34 | }
35 | };
36 |
37 | export default switchNetwork;
--------------------------------------------------------------------------------
/src/components/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./cardRewards";
2 | export * from "./form";
3 | export * from "./header";
4 | export * from "./navBack";
5 | export * from "./pageHeader";
6 | export * from "./proposal";
7 | export * from "./sectionHeader";
8 | export * from "./sidebarMenu";
9 | export * from "./tabs";
10 | export * from "./text";
11 | export * from "./timeRemaining";
12 | export * from "./reactApp";
13 |
--------------------------------------------------------------------------------
/src/components/navBack/index.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Typography } from "@mui/material";
3 | import { useNavigate } from "react-router-dom";
4 |
5 | type Props = {};
6 |
7 | const NavBack = (props: Props) => {
8 | const navigate = useNavigate();
9 | const onGoBack = () => {
10 | navigate(-1);
11 | };
12 | return (
13 |
14 | Back
15 |
16 | );
17 | };
18 |
19 | export { NavBack };
20 |
--------------------------------------------------------------------------------
/src/components/pageHeader/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box, Typography } from "@mui/material";
2 | import classNames from "classnames";
3 | import React from "react";
4 | import styles from "./styles.module.scss";
5 |
6 | type Props = {
7 | heading: string | Function;
8 | headingSub?: string;
9 | subHeading?: string;
10 | value?: string;
11 | };
12 |
13 | const PageHeader = ({ heading, headingSub, subHeading, value }: Props) => {
14 | return (
15 |
16 |
17 | {typeof heading === "string" && (
18 | {heading}
19 | )}
20 | {typeof heading === "function" && heading()}
21 | {headingSub && (
22 |
23 |
24 | {headingSub}
25 |
26 |
27 | )}
28 |
29 | {subHeading && {subHeading}}
30 | {value && {value}}
31 |
32 | );
33 | };
34 |
35 | PageHeader.defaultProps = {
36 | heading: "Lobbyist",
37 | };
38 |
39 | export { PageHeader };
40 |
--------------------------------------------------------------------------------
/src/components/pageHeader/styles.module.scss:
--------------------------------------------------------------------------------
1 | @use "../../styles/index.scss" as main;
2 |
3 | .header {
4 | }
5 |
--------------------------------------------------------------------------------
/src/components/proposal/cardHeader/index.tsx:
--------------------------------------------------------------------------------
1 | import { CardHeader } from "@mui/material";
2 | import { styled } from "@mui/material/styles";
3 | import classNames from "classnames";
4 | import { colors } from "../../../common";
5 |
6 | type Props = { title: string; isCenter?: boolean; isSolid?: boolean };
7 |
8 | const Header = styled(CardHeader)(({ theme }) => ({
9 | // background: `linear-gradient(90deg, ${colors.teal} 2%, ${colors.tealLight} 96%)`,
10 | background: "transparent",
11 | }));
12 |
13 | const HeaderSolid = styled(CardHeader)(({ theme }) => ({
14 | background: `linear-gradient(90deg, ${colors.teal} 2%, ${colors.tealLight} 96%)`,
15 | }));
16 |
17 | const ProposalCardHeader = ({ title, isCenter, isSolid }: Props) => {
18 | if (isSolid) {
19 | return (
20 |
28 | );
29 | }
30 | return (
31 |
36 | );
37 | };
38 |
39 | ProposalCardHeader.defaultProps = {
40 | isCenter: false,
41 | isSolid: false,
42 | };
43 |
44 | export { ProposalCardHeader };
45 |
--------------------------------------------------------------------------------
/src/components/proposal/cardTargetVotes/index.tsx:
--------------------------------------------------------------------------------
1 | import { Card, CardContent, Box, Typography } from "@mui/material";
2 | import { styled } from "@mui/material/styles";
3 | import { Proposal } from "../../../@types/proposal";
4 | import { Tokens } from "../../../token";
5 | import { TextContent, TextHead } from "../../text";
6 | import NumberType from "../../../common/number";
7 |
8 | type Props = {
9 | proposal: Proposal;
10 | };
11 |
12 | const Content = styled(CardContent)(({ theme }) => ({
13 | backgroundColor: theme.palette.secondary.main,
14 | }));
15 |
16 | const ProposalCardTargetVotes = ({ proposal }: Props) => {
17 | var rewardCurrency = Tokens[proposal.chain].filter(
18 | (token: any) => token.address == proposal.rewardCurrency
19 | );
20 | const colHeads = ["Max Rewards", "Target Votes"];
21 | return (
22 |
23 |
24 |
25 | {colHeads.map((c, idx) => (
26 |
27 | {c}
28 |
29 | ))}
30 |
31 |
32 |
33 | ${NumberType(proposal.usdAmount.toFixed(2), 2)}
34 |
35 | {proposal.targetVotes}
36 |
37 |
38 |
39 | {NumberType(proposal.reward.toFixed(2), 2) +
40 | " " +
41 | rewardCurrency[0].display}
42 |
43 |
44 |
45 |
46 | );
47 | };
48 |
49 | ProposalCardTargetVotes.defaultProps = {
50 | isProposer: false,
51 | };
52 |
53 | export { ProposalCardTargetVotes };
54 |
--------------------------------------------------------------------------------
/src/components/proposal/cardVaultIncentive/index.tsx:
--------------------------------------------------------------------------------
1 | import { Card, CardContent, Box, Typography } from "@mui/material";
2 | import { styled } from "@mui/material/styles";
3 | import { Proposal } from "../../../@types/proposal";
4 | import NumberType from "../../../common/number";
5 | import { TextContent, TextHead } from "../../text";
6 | import { ProposalCardHeader } from "../cardHeader";
7 | type Props = {
8 | proposal: Proposal;
9 | isProposer?: boolean | string | null;
10 | voteWeight?: number;
11 | };
12 |
13 | const Content = styled(CardContent)(({ theme }) => ({
14 | backgroundColor: theme.palette.secondary.main,
15 | }));
16 |
17 | const ProposalCardVaultIncentive = ({ proposal, isProposer, voteWeight }: Props) => {
18 | const colHeads = ["Total Vote Weight", "My Added Vote"];
19 | return (
20 |
21 |
22 |
23 | {colHeads.map((c, idx) => (
24 |
25 | {c}
26 |
27 | ))}
28 |
29 |
30 | {proposal.totalVoteWeight.toFixed(2)}
31 | {proposal.myvoteAmount > 0 ? NumberType(proposal.myvoteAmount.toFixed(2), 2) : 0}
32 |
33 |
34 |
35 | );
36 | };
37 |
38 | ProposalCardVaultIncentive.defaultProps = {
39 | isProposer: false,
40 | };
41 |
42 | export { ProposalCardVaultIncentive };
43 |
--------------------------------------------------------------------------------
/src/components/proposal/cardVaultPerVotes/index.tsx:
--------------------------------------------------------------------------------
1 | import { Card, CardContent, Box, Typography } from "@mui/material";
2 | import { styled } from "@mui/material/styles";
3 | import { Proposal } from "../../../@types/proposal";
4 | import NumberType from "../../../common/number";
5 | import { Tokens } from "../../../token";
6 | import { TextContent, TextHead } from "../../text";
7 | type Props = {
8 | proposal: Proposal;
9 | };
10 |
11 | const Content = styled(CardContent)(({ theme }) => ({
12 | backgroundColor: theme.palette.secondary.main,
13 | }));
14 |
15 | const ProposalCardPerVotes = ({ proposal }: Props) => {
16 | const colHeads = ["Min Rewards", "Per Votes"];
17 | var rewardCurrency = Tokens[proposal.chain].filter(
18 | (token: any) => token.address == proposal.rewardCurrency
19 | );
20 | return (
21 |
22 |
23 |
24 | {colHeads.map((c, idx) => (
25 |
26 | {c}
27 |
28 | ))}
29 |
30 |
31 | {NumberType((proposal.reward / (proposal.targetVotes / proposal.minVotes)).toFixed(3), 3) + " " + rewardCurrency[0].display}
32 | {proposal.minVotes}
33 |
34 |
35 |
36 | );
37 | };
38 |
39 | ProposalCardPerVotes.defaultProps = {
40 | isProposer: false,
41 | };
42 |
43 | export { ProposalCardPerVotes };
44 |
--------------------------------------------------------------------------------
/src/components/proposal/cardWrappedMatic/index.tsx:
--------------------------------------------------------------------------------
1 | import { Card, CardContent, Box, Typography, Button } from "@mui/material";
2 | import { styled } from "@mui/material/styles";
3 | import { Proposal } from "../../../@types/proposal";
4 | import { ProposalCardHeader } from "../cardHeader";
5 |
6 | type Props = {
7 | proposal: Proposal;
8 | };
9 |
10 | const Content = styled(CardContent)(({ theme }) => ({
11 | backgroundColor: theme.palette.secondary.main,
12 | }));
13 |
14 | const ProposalCardWrappedMatic = ({ proposal }: Props) => {
15 | const colHeads = ["Total Incentive", "Total Votes", "Total Votes Amount", ""];
16 | return (
17 |
18 |
19 |
20 |
21 | {colHeads.map((c, idx) => (
22 |
23 | {c}
24 |
25 | ))}
26 |
27 |
28 | {/* ${proposal.matic.total}
29 | {`${proposal.matic.votes}`}
30 | {`${proposal.matic.amount}`} */}
31 | ${""}
32 | {`${""}`}
33 | {`${""}`}
34 |
35 |
38 |
39 |
40 |
41 |
42 | );
43 | };
44 |
45 | export { ProposalCardWrappedMatic };
46 |
--------------------------------------------------------------------------------
/src/components/proposal/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./cardHeader";
2 | export * from "./cardActive";
3 | export * from "./cardCreated";
4 | export * from "./cardActiveSymbol";
5 | export * from "./cardVaultIncentive";
6 | export * from "./cardVaultEmission";
7 | export * from "./cardVaultReward";
8 | export * from "./cardVaultPerVotes";
9 | export * from "./cardWrappedMatic";
10 | export * from "./cardTargetVotes";
11 |
--------------------------------------------------------------------------------
/src/components/reactApp.tsx:
--------------------------------------------------------------------------------
1 | import classNames from "classnames";
2 | import { Outlet } from "react-router-dom";
3 | import { useTheme } from "@mui/material/styles";
4 | import useMediaQuery from "@mui/material/useMediaQuery";
5 | import { Header } from "./header";
6 | import { SidebarMenu } from "./sidebarMenu";
7 |
8 | const ReactApp = () => {
9 | const theme = useTheme();
10 | const isMobile = useMediaQuery(theme.breakpoints.down("mlg"));
11 |
12 | return (
13 |
24 | );
25 | };
26 |
27 | export { ReactApp };
28 |
--------------------------------------------------------------------------------
/src/components/sectionHeader/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box, OutlinedInput, Typography } from "@mui/material";
2 | import classNames from "classnames";
3 | import React from "react";
4 | import styles from "./styles.module.scss";
5 |
6 | type Props = {
7 | heading: string;
8 | onSearchChange?: () => void;
9 | };
10 |
11 | const SectionHeader = ({ heading, onSearchChange }: Props) => {
12 | return (
13 |
19 | {heading}
20 |
26 |
27 | );
28 | };
29 |
30 | SectionHeader.defaultProps = {
31 | heading: "Lobbyist",
32 | };
33 |
34 | export { SectionHeader };
35 |
--------------------------------------------------------------------------------
/src/components/sectionHeader/styles.module.scss:
--------------------------------------------------------------------------------
1 | @use "../../styles/index.scss" as main;
2 |
3 | .header {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/sidebarMenu/sidebarItem-Menu.scss:
--------------------------------------------------------------------------------
1 | .sidebarItem-MenuChain {
2 | position: absolute;
3 | width: 100%;
4 | top: 0px;
5 | right: -123%;
6 |
7 | background-color: #282931;
8 | border-radius: 1rem;
9 | padding: 15px 25px;
10 | z-index: 1000;
11 |
12 | &::before {
13 | content: "";
14 | display: block;
15 | position: absolute;
16 | top: 23px;
17 | left: -8px;
18 | width: 15px;
19 | height: 15px;
20 | background-color: #282931;
21 | transform: translateY(-50%) rotate(45deg);
22 | z-index: 0;
23 | }
24 |
25 | @media (max-width: 910px) {
26 | position: relative;
27 | top: unset;
28 | right: unset;
29 | background-color: unset;
30 | z-index: unset;
31 | padding: 5px;
32 |
33 | h6,
34 | span {
35 | font-size: 15px;
36 | color: #dce0e5;
37 | opacity: 0.7;
38 | }
39 |
40 | &::before {
41 | content: unset;
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/src/components/sidebarMenu/styles.module.scss:
--------------------------------------------------------------------------------
1 | @use "../../styles/index.scss" as main;
2 |
3 | .main {
4 | &Inner {
5 | background: main.$var-clr-black;
6 | transition: all 0.3s ease-in-out;
7 | }
8 | }
9 |
10 | .menu {
11 | &Mobile {
12 | transition: all 0.3s ease-in;
13 | position: fixed;
14 | align-items: center;
15 | width: 100%;
16 | text-align: center;
17 | background: #1f2028;
18 | left: 0;
19 | top: -200%;
20 | z-index: 3;
21 | margin-top: 60px;
22 | height: 0;
23 | flex-direction: column;
24 | }
25 |
26 | &Hamburger,
27 | &Logo {
28 | z-index: 5;
29 | }
30 |
31 | &Icon {
32 | @extend %menuIcon;
33 | border-radius: 100px;
34 | color: #071018cf;
35 |
36 | &--disabled {
37 | color: #5a5d60;
38 | }
39 | }
40 |
41 | &Text {
42 | margin-left: 10px;
43 | }
44 |
45 | body[class~="show-menu"] & {
46 | &Mobile {
47 | display: flex;
48 | height: calc(100vh - 60px);
49 | top: 0px;
50 | }
51 |
52 | &Text {
53 | font-size: 20px;
54 | }
55 | }
56 | }
57 |
58 | .chooseChain {
59 | display: flex;
60 | flex-direction: column;
61 | }
62 |
63 | @media (min-width:910px) {
64 | .chooseChain {
65 | position: absolute;
66 | background-color: #282931;
67 | left: 18rem;
68 | top: 5%;
69 | }
70 | }
--------------------------------------------------------------------------------
/src/components/tabs/index.tsx:
--------------------------------------------------------------------------------
1 | import React, { FunctionComponent } from "react";
2 | import { Tabs, Tab, TabsProps } from "@mui/material";
3 | import styles from "./styles.module.scss";
4 |
5 | export interface TabPanelProps {
6 | children?: React.ReactNode;
7 | index: number;
8 | value: number;
9 | }
10 |
11 | interface Props extends TabsProps {
12 | tabs: string[];
13 | isFill?: boolean;
14 | tabIndex: number;
15 | setTabIndex: (index: number) => void;
16 | }
17 |
18 | function a11yProps(index: number) {
19 | return {
20 | id: `full-width-tab-${index}`,
21 | "aria-controls": `full-width-tabpanel-${index}`,
22 | };
23 | }
24 |
25 | export function TabPanel(props: TabPanelProps) {
26 | const { children, value, index } = props;
27 |
28 | return (
29 |
35 | {value === index && children}
36 |
37 | );
38 | }
39 |
40 | const CustomTabs: FunctionComponent = ({
41 | tabs,
42 | isFill,
43 | tabIndex,
44 | setTabIndex,
45 | ...others
46 | }) => {
47 | const handleTabChange = (event: React.SyntheticEvent, index: number) => {
48 | setTabIndex(index);
49 | };
50 |
51 | return (
52 |
53 | {tabs.map((tab, index) => (
54 |
55 | ))}
56 |
57 | );
58 | };
59 |
60 | export { CustomTabs };
61 |
--------------------------------------------------------------------------------
/src/components/tabs/styles.module.scss:
--------------------------------------------------------------------------------
1 | @use "../../styles/index.scss" as main;
2 |
3 |
--------------------------------------------------------------------------------
/src/components/text copy/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./textHead";
2 | export * from "./textContent";
3 |
--------------------------------------------------------------------------------
/src/components/text copy/textContent/index.tsx:
--------------------------------------------------------------------------------
1 | import { Typography } from "@mui/material";
2 | import React from "react";
3 |
4 | type Props = {
5 | children?: React.ReactNode;
6 | };
7 |
8 | const TextContent: React.FC = ({ children }) => (
9 |
10 | {children}
11 |
12 | );
13 |
14 | export { TextContent };
15 |
--------------------------------------------------------------------------------
/src/components/text copy/textHead/index.tsx:
--------------------------------------------------------------------------------
1 | import { Typography } from "@mui/material";
2 | import React from "react";
3 | import { colors } from "../../../common";
4 |
5 | type Props = {
6 | children?: React.ReactNode;
7 | };
8 |
9 | const TextHead: React.FC = ({ children }) => (
10 |
11 | {children}
12 |
13 | );
14 |
15 | export { TextHead };
16 |
--------------------------------------------------------------------------------
/src/components/text/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./textHead";
2 | export * from "./textContent";
3 |
--------------------------------------------------------------------------------
/src/components/text/textContent/index.tsx:
--------------------------------------------------------------------------------
1 | import { Typography } from "@mui/material";
2 | import React from "react";
3 |
4 | type Props = {
5 | children?: React.ReactNode;
6 | };
7 |
8 | const TextContent: React.FC = ({ children }) => (
9 |
10 | {children}
11 |
12 | );
13 |
14 | export { TextContent };
15 |
--------------------------------------------------------------------------------
/src/components/text/textHead/index.tsx:
--------------------------------------------------------------------------------
1 | import { Typography } from "@mui/material";
2 | import classNames from "classnames";
3 | import React from "react";
4 | import { colors } from "../../../common";
5 |
6 | type Props = {
7 | children?: React.ReactNode;
8 | className?: string;
9 | color?: string;
10 | };
11 |
12 | const TextHead: React.FC = ({ children, color, className }) => (
13 |
18 | {children}
19 |
20 | );
21 |
22 | export { TextHead };
23 |
--------------------------------------------------------------------------------
/src/components/timeRemaining/styles.module.scss:
--------------------------------------------------------------------------------
1 | @use "../../styles/index.scss" as main;
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/contracts/contracts/addresses.json:
--------------------------------------------------------------------------------
1 | {
2 | "1": "0xD72BBE31925Fa84a66C46A23D52fCFe8b2F8840a",
3 | "10": "0x691Aa8AfA4eB9bF2537ef54dEd660129DC35C6e3",
4 | "56": "0x691Aa8AfA4eB9bF2537ef54dEd660129DC35C6e3",
5 | "137": "0xcfB7c77DCe535C7d34C5b13e813f2b7060011596",
6 | "250": "0xDF5b6975c9f833Dd73B327C675458F420998174F",
7 | "42161": "0x691Aa8AfA4eB9bF2537ef54dEd660129DC35C6e3",
8 | "43114": "0x7d3641D200C82A4Ec599F33ff9392a482a878E79"
9 | }
--------------------------------------------------------------------------------
/src/contracts/contracts/variableAddresses.json:
--------------------------------------------------------------------------------
1 | {
2 | "1": "0x6957B46fA1DC989AbA31394C6Bada6270bC56bf2",
3 | "10": "0x6bca3d4dAf32113E390557daD0c5b47170cE3F07",
4 | "56": "0xED0f81062F9BcB67b2863c23CFf21c8d9E96a42d",
5 | "137": "0xF3bF888D74C100509c8c22A3fA0FDeb1b883748C",
6 | "250": "0x7d3641D200C82A4Ec599F33ff9392a482a878E79",
7 | "42161": "0x6bca3d4dAf32113E390557daD0c5b47170cE3F07",
8 | "43114": "0xb69495b6cCa05AEfB07652D200819c7026eFD073"
9 | }
--------------------------------------------------------------------------------
/src/contracts/index.ts:
--------------------------------------------------------------------------------
1 | import { Api } from "@mui/icons-material";
2 | import { ethers } from "ethers";
3 |
4 | const Abis = require("./contracts/abis.json");
5 | const Addresses = require("./contracts/addresses.json");
6 | const variableAddresses = require("./contracts/variableAddresses.json");
7 |
8 | const RPCS = {
9 | 1: "https://mainnet.infura.io/v3/9f8f5ec266c54f85aa9e66fbe230b077",
10 | 10: "https://mainnet.optimism.io",
11 | 56: "https://rpc-bsc.bnb48.club",
12 | 137: "https://polygon-mainnet.infura.io/v3/9f8f5ec266c54f85aa9e66fbe230b077",
13 | 250: "https://rpc.ftm.tools",
14 | 42161: "https://arbitrum-mainnet.infura.io/v3/9f8f5ec266c54f85aa9e66fbe230b077",
15 | 43114: "https://avalanche-mainnet.infura.io/v3/9f8f5ec266c54f85aa9e66fbe230b077"
16 | };
17 | const providers: any = {
18 | 1: new ethers.providers.JsonRpcProvider(RPCS[1]),
19 | 10: new ethers.providers.JsonRpcProvider(RPCS[10]),
20 | 56: new ethers.providers.JsonRpcProvider(RPCS[56]),
21 | 137: new ethers.providers.JsonRpcProvider(RPCS[137]),
22 | 250: new ethers.providers.JsonRpcProvider(RPCS[250]),
23 | 42161: new ethers.providers.JsonRpcProvider(RPCS[42161]),
24 | 43114: new ethers.providers.JsonRpcProvider(RPCS[43114]),
25 | };
26 |
27 | const POOLContract = (e: any) => {
28 | const contract = new ethers.Contract(
29 | Addresses[e.chain],
30 | Abis.Pool,
31 | e.signer
32 | );
33 | return contract;
34 | }
35 |
36 | const VariableContract = (e: any) => {
37 | const contract = new ethers.Contract(
38 | variableAddresses[e.chain],
39 | Abis.Variable,
40 | e.signer
41 | );
42 | return contract;
43 | }
44 |
45 | const ERCContract = (e: any) => {
46 | const result = new ethers.Contract(
47 | e.address, Abis.ERC20, providers[e.chain]
48 | )
49 | return result;
50 | }
51 | export {
52 | POOLContract,
53 | ERCContract,
54 | VariableContract,
55 | providers
56 | };
57 |
--------------------------------------------------------------------------------
/src/gql/index.tsx:
--------------------------------------------------------------------------------
1 | import { gql } from "@apollo/client";
2 |
3 | const GET_PROPOSALS = gql`
4 | query Proposals($name: String) {
5 | proposals(
6 | first: 20
7 | skip: 0
8 | where: { space_in: ["balancer", $name], state: "active" }
9 | orderBy: "created"
10 | orderDirection: desc
11 | ) {
12 | id
13 | title
14 | body
15 | choices
16 | start
17 | end
18 | snapshot
19 | state
20 | author
21 | type
22 | space {
23 | id
24 | name
25 | }
26 | }
27 | }
28 | `;
29 |
30 | const GET_PROPOSAL = gql`
31 | query GetProposal($id:String){
32 | proposal(id:$id){
33 | id
34 | ipfs
35 | title
36 | discussion
37 | choices
38 | start
39 | end
40 | snapshot
41 | state
42 | author
43 | created
44 | plugins
45 | network
46 | type
47 | quorum
48 | symbol
49 | strategies{
50 | name
51 | network
52 | params
53 | }
54 | space{
55 | id
56 | name
57 | }
58 | scores_state
59 | scores
60 | scores_by_strategy
61 | scores_total
62 | votes
63 | }
64 | }
65 | `
66 |
67 | export { GET_PROPOSALS, GET_PROPOSAL };
68 |
--------------------------------------------------------------------------------
/src/index.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from "react-dom/client";
3 | import { Provider as ReduxProvider } from "react-redux";
4 | import { store } from "./redux/store";
5 | import { ThemeCtxProvider } from "./common/themeContext";
6 | import reportWebVitals from "./reportWebVitals";
7 | import { ApolloProvider, ApolloClient, InMemoryCache } from "@apollo/client";
8 | import App from "./App";
9 | import 'react-notifications/lib/notifications.css';
10 | import "./assets/css/nucleo-icons.css"
11 | import "./assets/css/nucleo-svg.css"
12 | import "./assets/css/app.css"
13 | import "./index.scss";
14 | import { NotificationContainer } from 'react-notifications';
15 |
16 | const root = ReactDOM.createRoot(
17 | document.getElementById("root") as HTMLElement
18 | );
19 |
20 | const client = new ApolloClient({
21 | uri: process.env.REACT_APP_GRAPQLENDPOINT,
22 | cache: new InMemoryCache(),
23 | });
24 |
25 | root.render(
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | );
37 |
38 | // If you want to start measuring performance in your app, pass a function
39 | // to log results (for example: reportWebVitals(console.log))
40 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
41 | reportWebVitals();
42 |
--------------------------------------------------------------------------------
/src/pages/NotPage.tsx:
--------------------------------------------------------------------------------
1 | import { Link } from "react-router-dom";
2 | import "./notpage.scss";
3 | import { Button } from "@mui/material";
4 |
5 | const NotPage = () => {
6 | return (
7 |
8 |
404
9 |
10 |
15 |
16 |
17 | )
18 | }
19 |
20 | export default NotPage;
--------------------------------------------------------------------------------
/src/pages/home/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from "@mui/material";
2 | import {
3 | CardRewards,
4 | ProposalCardActive,
5 | ProposalCardCreated,
6 | } from "../../components";
7 | import { useSelector, RootState } from "../../redux/store";
8 | import { Proposal } from "../../@types/proposal";
9 |
10 | type Props = {};
11 |
12 | const Homepage = (props: Props) => {
13 |
14 | const walletAddress: any = useSelector(
15 | (state: RootState) => state.wallet.address
16 | );
17 | // @ts-ignore
18 | const filteredProposals: Proposal[] = useSelector((state: RootState) => state.proposal.currentProposal.data);
19 | return (
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | );
28 | };
29 |
30 | export default Homepage;
31 |
--------------------------------------------------------------------------------
/src/pages/notpage.scss:
--------------------------------------------------------------------------------
1 | .notpage {
2 | width: 100vw;
3 | height: 100vh;
4 | margin: auto;
5 | text-align: center;
6 | display: flex;
7 | justify-content: center;
8 | align-items: center;
9 | flex-direction: column;
10 |
11 | .error {
12 | font-size: 120px !important;
13 | font-weight: 1000;
14 | }
15 | }
--------------------------------------------------------------------------------
/src/pages/proposalNew/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from "@mui/material";
2 | import { useParams } from "react-router-dom";
3 | import {
4 | ProtocolList,
5 | ProposalType,
6 | ProposalKpi,
7 | ProposalForm,
8 | ProposalPreview,
9 | ProposalConfirm,
10 | } from "./partials";
11 | import { PageHeader } from "./partials/common";
12 | import { useEffect } from "react";
13 |
14 | type Props = {};
15 |
16 | const ProposalNewPage = (props: Props) => {
17 | const { protocol, prsalType, kpi, status } = useParams();
18 |
19 | return (
20 |
21 |
22 |
23 |
24 | {prsalType && protocol && kpi && status ? (
25 | status === "preview" ? (
26 |
27 | ) : (
28 |
29 | )
30 | ) : prsalType && protocol ? (
31 |
32 | ) : protocol ? (
33 |
34 | ) : protocol ? (
35 |
36 | ) : (
37 |
38 | )}
39 |
40 |
41 |
42 | );
43 | };
44 |
45 | export default ProposalNewPage;
46 |
--------------------------------------------------------------------------------
/src/pages/proposalNew/partials/common/card/index.tsx:
--------------------------------------------------------------------------------
1 | import { Card, CardContent, Typography } from "@mui/material";
2 | import { styled } from "@mui/material/styles";
3 | import { useNavigate } from "react-router-dom";
4 | import { ProposalCardHeader } from "../../../../../components";
5 |
6 | type Props = {
7 | title: string;
8 | slug?: string;
9 | isType?: boolean;
10 | isSolid?: boolean;
11 | };
12 |
13 | const Content = styled(CardContent)(({ theme }) => ({
14 | backgroundColor: theme.palette.secondary.main,
15 | }));
16 |
17 | const ProposalNewCard = ({ title, slug, isType, isSolid }: Props) => {
18 | const navigate = useNavigate();
19 |
20 | const onClickNavigate = () => {
21 | slug && navigate(slug);
22 | }
23 | return (
24 |
25 | {isType ? (
26 |
27 |
28 | {title}
29 |
30 |
31 | ) : (
32 | <>
33 |
34 |
35 | >
36 | )}
37 |
38 | );
39 | };
40 |
41 | ProposalNewCard.defaultProps = {
42 | title: "",
43 | isType: false,
44 | isSolid: false,
45 | };
46 |
47 | export { ProposalNewCard };
48 |
--------------------------------------------------------------------------------
/src/pages/proposalNew/partials/common/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./card";
2 | export * from "./pageHeader";
3 |
--------------------------------------------------------------------------------
/src/pages/proposalNew/partials/common/pageHeader/breadCrumb.tsx:
--------------------------------------------------------------------------------
1 | import { Box, Typography } from "@mui/material";
2 | import { useLocation, useParams } from "react-router-dom";
3 | import {
4 | EnumProposalKpi,
5 | EnumProposalType,
6 | } from "../../../../../@types/proposal";
7 | import { EnumProtocolName } from "../../../../../@types/protocol";
8 |
9 | type Props = {};
10 |
11 | type NavItem = {
12 | title: string;
13 | href: string;
14 | };
15 |
16 | const BreadCrumb = (props: Props) => {
17 | const { protocol, prsalType, kpi, status } = useParams();
18 | const items: NavItem[] = [];
19 |
20 | let locPrefix = "/proposal/new";
21 |
22 | if (protocol) {
23 | locPrefix = `${locPrefix}/${protocol}`;
24 | items.push({
25 | title: EnumProtocolName[protocol as keyof typeof EnumProtocolName],
26 | href: locPrefix,
27 | });
28 | }
29 | if (prsalType) {
30 | locPrefix = `${locPrefix}/${prsalType}`;
31 | items.push({
32 | title: EnumProposalType[prsalType as keyof typeof EnumProposalType],
33 | href: `${locPrefix}/${prsalType}`,
34 | });
35 | }
36 | if (kpi) {
37 | if (kpi !== "form") {
38 | locPrefix = `${locPrefix}/${kpi}`;
39 | items.push({
40 | title: EnumProposalKpi[kpi as keyof typeof EnumProposalKpi],
41 | href: `${locPrefix}/${kpi}`,
42 | });
43 | }
44 | items.push({
45 | title: "Proposal Parameters",
46 | href: "",
47 | });
48 | }
49 |
50 | if (status) {
51 | items.push({
52 | title: "Overview",
53 | href: "",
54 | });
55 | }
56 |
57 | return (
58 |
59 | {items.map((nav, idx) => (
60 |
61 | {nav.title}
62 | {idx + 1 < items.length && {">"}}
63 |
64 | ))}
65 |
66 | );
67 | };
68 |
69 | export { BreadCrumb };
70 |
--------------------------------------------------------------------------------
/src/pages/proposalNew/partials/common/pageHeader/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from "@mui/material";
2 | import { useParams } from "react-router-dom";
3 | import { NavBack } from "../../../../../components";
4 | import { BreadCrumb } from "./breadCrumb";
5 |
6 | type Props = {};
7 |
8 | const PageHeader = (props: Props) => {
9 | const { protocol } = useParams();
10 |
11 | return protocol ? (
12 |
13 |
14 |
15 |
16 | ) : (
17 |
18 | );
19 | };
20 |
21 | export { PageHeader };
22 |
--------------------------------------------------------------------------------
/src/pages/proposalNew/partials/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./protocolList";
2 | export * from "./proposalType";
3 | export * from "./proposalKpi";
4 | export * from "./proposalForm";
5 | export * from "./proposalPreview";
6 | export * from "./proposalConfirm";
7 |
--------------------------------------------------------------------------------
/src/pages/proposalNew/partials/proposalConfirm/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box, Link, Typography } from "@mui/material";
2 | import { styled } from "@mui/material/styles";
3 | import CheckIcon from "@mui/icons-material/Check";
4 | import { colors } from "../../../../common";
5 |
6 | type Props = {};
7 |
8 | const BoxCheck = styled(Box)(({ theme }) => ({
9 | backgroundColor: colors.success,
10 | }));
11 |
12 | const ProposalConfirm = (props: Props) => {
13 | return (
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | Your proposal has been created, you can view your proposal by
24 | opening this link{" "}
25 |
30 | https://covenant.vote/yhs77hannnnabsh69
31 |
32 |
33 |
34 |
35 | IPFS: LINK
36 |
37 |
38 |
39 |
40 | );
41 | };
42 |
43 | export { ProposalConfirm };
44 |
--------------------------------------------------------------------------------
/src/pages/proposalNew/partials/proposalKpi/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from "@mui/material";
2 | import { EnumProposalKpi } from "../../../../@types/proposal";
3 | import { ProposalNewCard } from "../common";
4 |
5 | type Props = {};
6 |
7 | const ProposalKpi = (props: Props) => {
8 | return (
9 |
10 | {Object.keys(EnumProposalKpi).map((pt, idx) => (
11 |
17 | ))}
18 |
19 | );
20 | };
21 |
22 | export { ProposalKpi };
23 |
--------------------------------------------------------------------------------
/src/pages/proposalNew/partials/proposalPreview/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box, Button } from "@mui/material";
2 | import { styled } from "@mui/material/styles";
3 | import { useNavigate, useParams } from "react-router-dom";
4 | import { FormDataPreview } from "../../../../components/form";
5 |
6 | type Props = {};
7 |
8 | const BoxForm = styled(Box)(({ theme }) => ({
9 | backgroundColor: theme.palette.secondary.main,
10 | }));
11 |
12 | const ProposalPreview = (props: Props) => {
13 | const { protocol, prsalType, kpi } = useParams();
14 | const navigate = useNavigate();
15 |
16 | const onFundProposal = () => {
17 | navigate(`/proposal/new/${protocol}/${prsalType}/${kpi}/confirm`);
18 | };
19 |
20 | return (
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
42 |
43 |
44 | );
45 | };
46 |
47 | export { ProposalPreview };
48 |
--------------------------------------------------------------------------------
/src/pages/proposalNew/partials/proposalType/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from "@mui/material";
2 | import { useParams } from "react-router-dom";
3 | import { EnumProposalType } from "../../../../@types/proposal";
4 | import { ProposalNewCard } from "../common";
5 |
6 | type Props = {};
7 |
8 | const ProposalType = (props: Props) => {
9 | const { protocol } = useParams();
10 | return (
11 |
12 | {Object.keys(EnumProposalType)
13 | .filter(pt => {
14 | if (protocol === "aave" && pt === "gauge") {
15 | return false;
16 | } if (protocol === "vesq" && pt === "gauge") {
17 | return false;
18 | }
19 | return true;
20 | })
21 | .map((pt, idx) => (
22 |
28 | ))}
29 |
30 | );
31 | };
32 |
33 | export { ProposalType };
34 |
--------------------------------------------------------------------------------
/src/pages/proposalNew/partials/protocolList/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from "@mui/material";
2 | import { ProtocolsList } from "../../../../@types/protocol";
3 | import { ProposalNewCard } from "../common";
4 |
5 | type Props = {};
6 |
7 | const ProtocolList = (props: Props) => {
8 | return (
9 |
10 | {ProtocolsList.map((pl, idx) => (
11 |
12 | ))}
13 |
14 | );
15 | };
16 |
17 | export { ProtocolList };
18 |
--------------------------------------------------------------------------------
/src/pages/proposalSymbol/active.tsx:
--------------------------------------------------------------------------------
1 | import { useSelector } from "../../redux/store";
2 | import { ProposalCardActiveSymbol } from "../../components";
3 |
4 | type Props = {
5 | symbol: string;
6 | isHistory: boolean;
7 | };
8 |
9 | const ActiveProposals = ({ symbol, isHistory }: Props) => {
10 | const proposalState = useSelector((state) => state.proposal);
11 | // @ts-ignore
12 | const filteredProposals = proposalState.currentProposal.data;
13 |
14 | return (
15 |
20 | );
21 | };
22 |
23 | export default ActiveProposals;
24 |
--------------------------------------------------------------------------------
/src/pages/proposalSymbol/index.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from "react";
2 | import { Box, Button } from "@mui/material";
3 | import ControlPointIcon from "@mui/icons-material/ControlPoint";
4 | import { useNavigate, useParams } from "react-router-dom";
5 | import { CustomTabs as Tabs } from "../../components";
6 | import ActiveProposals from "./active";
7 | import { Link } from "react-router-dom";
8 | import symbols from "./symbols.json";
9 |
10 | type Props = {};
11 |
12 | const tabs: string[] = ["Proposals", "History"];
13 |
14 | const ProposalSymbol = (props: Props) => {
15 | const navigate = useNavigate();
16 | let { symbol } = useParams();
17 | const [tabIndex, setTabIndex] = useState(0);
18 | useEffect(() => {
19 | var mysymbol = symbols.filter((s) => s === symbol);
20 | if (mysymbol.length === 0) {
21 | navigate("/");
22 | }
23 | })
24 | const paramSymbol = symbol ?? "";
25 |
26 | return (
27 |
28 |
29 |
30 |
31 |
32 | }
37 | >
38 | Create Proposal
39 |
40 |
41 |
42 | {tabIndex === 0 ? (
43 |
44 | ) :
45 | (
46 |
47 | )}
48 |
49 |
50 | );
51 | };
52 |
53 | export default ProposalSymbol;
54 |
--------------------------------------------------------------------------------
/src/pages/proposalSymbol/symbols.json:
--------------------------------------------------------------------------------
1 | [
2 | "qidao",
3 | "aave",
4 | "aurafinance",
5 | "beets",
6 | "saddlefinance",
7 | "ribbon",
8 | "onx",
9 | "vesqdao"
10 | ]
--------------------------------------------------------------------------------
/src/pages/proposalSymbolVote/snapshotlink.ts:
--------------------------------------------------------------------------------
1 | export const links: any = {
2 | "ribbon": "gauge.rbn",
3 | "onx": "onx-finance",
4 | "aave": "aave",
5 | "aurafinance": "aurafinance",
6 | "saddlefinance": "saddlefinance",
7 | "beets": "beets",
8 | "qidao": "qidao",
9 | "vesqdao": "vesqdao"
10 | }
--------------------------------------------------------------------------------
/src/pages/proposalSymbolVote/vote.scss:
--------------------------------------------------------------------------------
1 | .voteModal {
2 | background-color: #282931;
3 | display: flex;
4 | width: 500px;
5 | justify-content: center;
6 |
7 | .slider {
8 | margin-top: 30px;
9 | }
10 | }
11 |
12 | .bottom {
13 | border-bottom-left-radius: 2rem;
14 | border-bottom-right-radius: 2rem;
15 | }
16 |
17 | .modaladdpaper-title {
18 | padding: 20px 30px 0;
19 | }
--------------------------------------------------------------------------------
/src/pages/total/analytics/index.scss:
--------------------------------------------------------------------------------
1 | .analytics {
2 | margin-top: 20px;
3 | width: 100%;
4 |
5 | .wall-select {
6 | background-color: #282931;
7 | border: none;
8 | padding: 15px 25px 15px 15px;
9 | border-radius: 20px;
10 | font-size: 15px;
11 | margin-left: 10px;
12 | cursor: pointer;
13 |
14 | &:focus {
15 | --tw-ring-shadow: initial;
16 | }
17 | }
18 |
19 | .analytics-justify {
20 | justify-content: start;
21 | }
22 |
23 | .item {
24 | border: 1px solid #383944;
25 | background-color: #282931;
26 | border-radius: 30px;
27 | padding: 15px;
28 | margin: auto;
29 | width: 220px;
30 | }
31 | }
32 |
33 | .analytics-grid-col {
34 | grid-template-columns: repeat(4, minmax(0, 1fr))
35 | }
36 |
37 | .analy-font-1 {
38 | font-size: 20px;
39 | }
40 |
41 | @media (max-width:1160px) {
42 | .analytics-grid-col {
43 | grid-template-columns: repeat(3, minmax(0, 1fr))
44 | }
45 | }
46 |
47 | @media (max-width:734px) {
48 | .analytics-grid-col {
49 | grid-template-columns: repeat(2, minmax(0, 1fr))
50 | }
51 | }
52 |
53 | @media (max-width:530px) {
54 | .analytics-grid-col {
55 | grid-template-columns: repeat(1, minmax(0, 1fr))
56 | }
57 | }
--------------------------------------------------------------------------------
/src/pages/total/index.tsx:
--------------------------------------------------------------------------------
1 | import Proposals from "./proposals";
2 | import Protocols from "./protocols";
3 | import Analytics from "./analytics";
4 | import { useNavigate, useParams } from "react-router-dom";
5 |
6 | const All = () => {
7 | let { id } = useParams();
8 | return (
9 | <>
10 | {id == "protocols" ? : id == "proposal" ? : id == "analytics" ? : ""}
11 | >
12 | )
13 | }
14 |
15 | export default All;
--------------------------------------------------------------------------------
/src/pages/total/proposals/index.scss:
--------------------------------------------------------------------------------
1 | .wall {
2 | margin-top: 20px;
3 | width: 100%;
4 |
5 | .wall-select {
6 | background-color: #282931;
7 | border: none;
8 | padding: 15px 25px 15px 15px;
9 | border-radius: 20px;
10 | font-size: 15px;
11 | margin-left: 10px;
12 | cursor: pointer;
13 |
14 | &:focus {
15 | --tw-ring-shadow: initial;
16 | }
17 | }
18 | }
19 |
20 | .item {
21 | border: 1px solid #383944;
22 | background-color: #282931;
23 | border-radius: 30px;
24 | padding: 23px;
25 | margin: 5px;
26 | width: 300px;
27 |
28 | .item-font-1 {
29 | font-size: 10px;
30 | color: rgb(216, 216, 216);
31 | }
32 |
33 | .item-font-2 {
34 | font-size: 20px;
35 | font-weight: 600;
36 | }
37 | }
38 |
39 | .item-gap {
40 | display: grid;
41 | gap: 1rem;
42 | margin: 0 auto;
43 | }
44 |
45 | .chains {
46 | position: relative;
47 | width: 100px;
48 |
49 | img {
50 | position: absolute;
51 | }
52 | }
53 |
54 | .pro-btn {
55 | min-width: 10rem !important;
56 | }
57 |
58 | .will-justify {
59 | justify-content: start;
60 | }
61 |
62 | .wall-grid-col {
63 | grid-template-columns: repeat(3, minmax(0, 1fr))
64 | }
65 |
66 | @media (max-width:1178px) {
67 | .wall-grid-col {
68 | grid-template-columns: repeat(2, minmax(0, 1fr))
69 | }
70 | }
71 |
72 | @media (max-width:664px) {
73 | .wall-grid-col {
74 | grid-template-columns: repeat(1, minmax(0, 1fr))
75 | }
76 |
77 | .will-justify {
78 | justify-content: center;
79 | }
80 | }
--------------------------------------------------------------------------------
/src/providerOptions/index.tsx:
--------------------------------------------------------------------------------
1 | import WalletConnect from "@walletconnect/web3-provider";
2 | import CoinbaseWalletSDK from "@coinbase/wallet-sdk";
3 | import Portis from "@portis/web3";
4 | import Fortmatic from "fortmatic";
5 | // import Squarelink from "squarelink";
6 |
7 | export const providerOptions = {
8 | walletlink: {
9 | package: CoinbaseWalletSDK, // Required
10 | options: {
11 | appName: "Web 3 Modal Demo", // Required
12 | infuraId: process.env.REACT_APP_INFURA_KEY, // Required unless you provide a JSON RPC url; see `rpc` below
13 | },
14 | },
15 | walletconnect: {
16 | package: WalletConnect, // required
17 | options: {
18 | infuraId: process.env.REACT_APP_INFURA_KEY, // required
19 | },
20 | },
21 | portis: {
22 | package: Portis, // required
23 | options: {
24 | id: "1a686526-b1c5-4e2f-ba28-3cf324586987", // required
25 | },
26 | },
27 | fortmatic: {
28 | package: Fortmatic, // required
29 | options: {
30 | key: process.env.REACT_APP_FORTMATIC, // required
31 | },
32 | },
33 | };
34 |
--------------------------------------------------------------------------------
/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/src/redux/rootReducer.ts:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux";
2 | // slices
3 | import proposalReducer from "./slices/proposal";
4 | import walletReducer from "./slices/wallet";
5 | import clickProposalReducer from "./slices/clickProposal";
6 | import clickTokenReducer from "./slices/clickToken";
7 | import providerReducer from "./slices/provider";
8 | import chainProvider from "./slices/chain";
9 |
10 | // ----------------------------------------------------------------------
11 |
12 | const rootReducer = combineReducers({
13 | proposal: proposalReducer,
14 | wallet: walletReducer,
15 | chain:chainProvider,
16 | clickProposal: clickProposalReducer,
17 | clickToken: clickTokenReducer,
18 | provider: providerReducer,
19 | });
20 |
21 | export { rootReducer };
22 |
--------------------------------------------------------------------------------
/src/redux/slices/chain.ts:
--------------------------------------------------------------------------------
1 | import { createSlice } from "@reduxjs/toolkit";
2 |
3 | // ----------------------------------------------------------------------
4 | const initialState = {
5 | id: 137,
6 | };
7 |
8 | const slice = createSlice({
9 | name: "chain",
10 | initialState,
11 | reducers: {
12 | setChainName(state, action) {
13 | state.id = action.payload;
14 | },
15 | },
16 | });
17 |
18 | // Reducer
19 | export default slice.reducer;
20 |
21 | // Actions
22 | export const { setChainName } = slice.actions;
23 |
24 | // ----------------------------------------------------------------------
25 |
--------------------------------------------------------------------------------
/src/redux/slices/clickProposal.ts:
--------------------------------------------------------------------------------
1 | import { createSlice } from "@reduxjs/toolkit";
2 | import { Proposal } from "../../@types/proposal";
3 |
4 | interface initialStateProposal {
5 | clickproposal: Proposal[];
6 | }
7 |
8 | const initialState: initialStateProposal = {
9 | clickproposal: [],
10 | };
11 |
12 | const slice = createSlice({
13 | name: "clickproposal",
14 | initialState,
15 | reducers: {
16 | setClickProposal(state, action) {
17 | state.clickproposal = action.payload;
18 | },
19 | },
20 | });
21 |
22 | export default slice.reducer;
23 | export const { setClickProposal } = slice.actions;
24 |
--------------------------------------------------------------------------------
/src/redux/slices/clickToken.ts:
--------------------------------------------------------------------------------
1 | import { createSlice } from "@reduxjs/toolkit";
2 |
3 | // ----------------------------------------------------------------------
4 |
5 | interface initialStateObject {
6 | address: string;
7 | }
8 |
9 | const initialState: initialStateObject = {
10 | address: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
11 | };
12 |
13 | const slice = createSlice({
14 | name: "clickToken",
15 | initialState,
16 | reducers: {
17 | setClickAddress(state, action) {
18 | state.address = action.payload;
19 | },
20 | },
21 | });
22 |
23 | // Reducer
24 | export default slice.reducer;
25 |
26 | // Actions
27 | export const { setClickAddress } = slice.actions;
28 |
29 | // ----------------------------------------------------------------------
30 |
--------------------------------------------------------------------------------
/src/redux/slices/proposal.ts:
--------------------------------------------------------------------------------
1 | import { createSlice } from "@reduxjs/toolkit";
2 | import { ProposalState } from "../../@types/proposal";
3 | //
4 | // import { dispatch } from "../store";
5 |
6 | // ----------------------------------------------------------------------
7 |
8 | const initialState: ProposalState = {
9 | activeProposals: [],
10 | historyProposals: [],
11 | currentProposal: [],
12 | };
13 |
14 | const slice = createSlice({
15 | name: "proposal",
16 | initialState,
17 | reducers: {
18 | setCurrentProposal(state, action) {
19 | state.currentProposal = action.payload;
20 | },
21 | },
22 | });
23 |
24 | // Reducer
25 | export default slice.reducer;
26 |
27 | // Actions
28 | export const { setCurrentProposal } = slice.actions;
29 |
30 | // ----------------------------------------------------------------------
31 |
--------------------------------------------------------------------------------
/src/redux/slices/provider.ts:
--------------------------------------------------------------------------------
1 | import { createSlice } from "@reduxjs/toolkit";
2 |
3 | // ----------------------------------------------------------------------
4 |
5 | interface initialStateObject {
6 | provider: Object;
7 | }
8 |
9 | const initialState: initialStateObject = {
10 | provider: [],
11 | };
12 |
13 | const slice = createSlice({
14 | name: "provider",
15 | initialState,
16 | reducers: {
17 | setProvider(state, action) {
18 | state.provider = action.payload;
19 | },
20 | },
21 | });
22 |
23 | // Reducer
24 | export default slice.reducer;
25 |
26 | // Actions
27 | export const { setProvider } = slice.actions;
28 |
29 | // ----------------------------------------------------------------------
30 |
--------------------------------------------------------------------------------
/src/redux/slices/wallet.ts:
--------------------------------------------------------------------------------
1 | import { createSlice } from "@reduxjs/toolkit";
2 |
3 | // ----------------------------------------------------------------------
4 |
5 | interface initialStateObject {
6 | address: string;
7 | }
8 |
9 | const initialState: initialStateObject = {
10 | address: "",
11 | };
12 |
13 | const slice = createSlice({
14 | name: "wallet",
15 | initialState,
16 | reducers: {
17 | setWalletAddress(state, action) {
18 | state.address = action.payload;
19 | },
20 | },
21 | });
22 |
23 | // Reducer
24 | export default slice.reducer;
25 |
26 | // Actions
27 | export const { setWalletAddress } = slice.actions;
28 |
29 | // ----------------------------------------------------------------------
30 |
--------------------------------------------------------------------------------
/src/redux/store.ts:
--------------------------------------------------------------------------------
1 | import { configureStore } from "@reduxjs/toolkit";
2 | import {
3 | useDispatch as useAppDispatch,
4 | useSelector as useAppSelector,
5 | TypedUseSelectorHook,
6 | } from "react-redux";
7 | import { rootReducer } from "./rootReducer";
8 |
9 | // ----------------------------------------------------------------------
10 |
11 | const store = configureStore({
12 | reducer: rootReducer,
13 | middleware: (getDefaultMiddleware) =>
14 | getDefaultMiddleware({
15 | serializableCheck: false,
16 | immutableCheck: false,
17 | }),
18 | });
19 |
20 | export type RootState = ReturnType;
21 |
22 | export type AppDispatch = typeof store.dispatch;
23 |
24 | const { dispatch } = store;
25 |
26 | const useDispatch = () => useAppDispatch();
27 |
28 | const useSelector: TypedUseSelectorHook = useAppSelector;
29 |
30 | export { store, dispatch, useSelector, useDispatch };
31 |
--------------------------------------------------------------------------------
/src/reportWebVitals.ts:
--------------------------------------------------------------------------------
1 | import { ReportHandler } from 'web-vitals';
2 |
3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4 | if (onPerfEntry && onPerfEntry instanceof Function) {
5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6 | getCLS(onPerfEntry);
7 | getFID(onPerfEntry);
8 | getFCP(onPerfEntry);
9 | getLCP(onPerfEntry);
10 | getTTFB(onPerfEntry);
11 | });
12 | }
13 | };
14 |
15 | export default reportWebVitals;
16 |
--------------------------------------------------------------------------------
/src/routes/index.tsx:
--------------------------------------------------------------------------------
1 | import { FC } from "react";
2 | import { Routes, Route, BrowserRouter } from "react-router-dom";
3 | import HomePage from "../pages/home";
4 | import All from "../pages/total";
5 | import ProposalNewPage from "../pages/proposalNew";
6 | import ProposalSymbolPage from "../pages/proposalSymbol";
7 | import ProposalSymbolVotePage from "../pages/proposalSymbolVote";
8 | import { ReactApp } from "../components";
9 | import NotPage from "../pages/NotPage";
10 |
11 | const { PUBLIC_URL } = process.env;
12 |
13 | const AppRoutes: FC = () => {
14 | return (
15 |
16 |
17 | }>
18 | } />
19 | } />
20 | } />
21 | } />
22 | } />
23 | } />
24 | } />
25 | } />
26 | } />
27 |
28 | } />
29 |
30 |
31 | );
32 | };
33 |
34 | export { AppRoutes };
35 |
--------------------------------------------------------------------------------
/src/services/index.ts:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import { setCurrentProposal } from "../redux/slices/proposal";
3 | import { dispatch } from "../redux/store";
4 | import { Tokens } from "../token";
5 | import { Coins } from "../blockchain";
6 |
7 | axios.defaults.baseURL = process.env.REACT_APP_SERVERENDPOINT;
8 |
9 | var baseURL = "https://score.snapshot.org/";
10 |
11 | const Proposal_load = async (req: any) => {
12 | try {
13 | var res = await axios.post("/api/load-proposal", req);
14 | for (var i = 0; i < res.data.data.length; i++) {
15 | var api = Tokens[res.data.data[i].chain].filter((token: any) => token.address === res.data.data[i].rewardCurrency);
16 | var tokenPrice = await Coins(api[0].api);
17 | res.data.data[i].usdAmount = res.data.data[i].reward * tokenPrice;
18 | }
19 | dispatch(setCurrentProposal(res.data));
20 | } catch (err: any) {
21 | return false;
22 | }
23 | };
24 | const Vote = async (req: any) => {
25 | try {
26 | var res = await axios.post("/api/vote", req);
27 | return res.data;
28 | } catch (error) {
29 | console.log(error);
30 | }
31 | }
32 |
33 | const GetVoteWeight = async (req: any) => {
34 | try {
35 | var res = await axios.post(baseURL, {
36 | "jsonrpc": "2.0",
37 | "method": "get_vp",
38 | "params": {
39 | "address": req.address,
40 | "network": req.network,
41 | "strategies": req.strategies,
42 | "snapshot": req.snapshot,
43 | "space": req.space,
44 | "delegation": false
45 | },
46 | "id": null
47 | });
48 | return res.data.result;
49 | } catch (err: any) {
50 | console.log(err);
51 | }
52 | }
53 |
54 | // Export Functions
55 | const Action = {
56 | Proposal_load,
57 | GetVoteWeight,
58 | Vote
59 | };
60 |
61 | export default Action;
62 |
--------------------------------------------------------------------------------
/src/setupTests.ts:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------
/src/styles/index.scss:
--------------------------------------------------------------------------------
1 | /************
2 | * Settings
3 | *************/
4 | @forward "settings/globals" as var-*;
5 |
6 | /************
7 | * Tools
8 | *************/
9 | @forward "mixins/breakpoints";
10 | @forward "mixins/placeholder";
11 |
12 | /************
13 | * Base
14 | *************/
15 |
16 | /************
17 | * Animations
18 | *************/
19 |
20 | /************
21 | * Objects
22 | *************/
23 | @forward "objects/flex";
24 | @forward "objects/elements";
25 | @forward "objects/forms";
--------------------------------------------------------------------------------
/src/styles/mixins/_breakpoints.scss:
--------------------------------------------------------------------------------
1 | // Media of at most the maximum and minimum breakpoint widths. No query for the largest breakpoint.
2 | // Makes the @content apply to the given breakpoint.
3 | @use "../settings/globals.scss";
4 |
5 | // Respond above.
6 | @mixin respond-above($brpVal, $breakpoints: globals.$grid-breakpoints) {
7 |
8 | // If the breakpoint exists in the map.
9 | @if map-has-key($breakpoints, $brpVal) {
10 | // Get the breakpoint value.
11 | $breakpoint-value: map-get($breakpoints, $brpVal);
12 |
13 | // Write the media query.
14 | @media (min-width: $breakpoint-value) {
15 | @content;
16 | }
17 |
18 | // If the breakpoint doesn't exist in the map.
19 | }
20 |
21 | @else {
22 | // Log a warning.
23 | @warn 'Invalid breakpoint: #{$brpVal}.';
24 | }
25 | }
26 |
27 | @mixin respond-below($brpVal, $breakpoints: globals.$grid-breakpoints) {
28 |
29 | // If the breakpoint exists in the map.
30 | @if map-has-key($breakpoints, $brpVal) {
31 | // Get the breakpoint value.
32 | $breakpoint-value: map-get($breakpoints, $brpVal);
33 |
34 | // Write the media query.
35 | @media (max-width: ($breakpoint-value - 1)) {
36 | @content;
37 | }
38 |
39 | // If the breakpoint doesn't exist in the map.
40 | }
41 |
42 | @else {
43 | // Log a warning.
44 | @warn 'Invalid breakpoint: #{$brpVal}.';
45 | }
46 | }
--------------------------------------------------------------------------------
/src/styles/mixins/_placeholder.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Input placeholder color
3 | //
4 |
5 | @mixin placeholder($color) {
6 | // Chrome, Firefox, Opera, Safari 10.1+
7 | &::placeholder {
8 | color: $color;
9 | }
10 |
11 | // Firefox
12 | &::-moz-placeholder {
13 | color: $color;
14 | opacity: 1;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/styles/objects/elements.scss:
--------------------------------------------------------------------------------
1 | @use "../settings/globals.scss" as var;
2 |
3 | %topIcon {
4 | color: var.$clr-white;
5 | background: var.$clr-black;
6 | svg {
7 | font-size: 4rem;
8 | fill: transparent;
9 | }
10 | }
11 |
12 | %menuIcon {
13 | color: #c4c4c4;
14 | background: #282931;
15 | svg {
16 | font-size: 2rem;
17 | fill: transparent;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/styles/objects/flex.scss:
--------------------------------------------------------------------------------
1 | %flexColAlignStart {
2 | display: flex;
3 | flex-direction: column;
4 | align-items: flex-start;
5 | }
6 |
7 | %flexCenter {
8 | display: flex;
9 | align-items: center;
10 | justify-content: center;
11 | }
12 |
--------------------------------------------------------------------------------
/src/styles/objects/forms.scss:
--------------------------------------------------------------------------------
1 | @use "../settings/globals.scss" as var;
2 |
3 |
--------------------------------------------------------------------------------
/src/styles/settings/globals.scss:
--------------------------------------------------------------------------------
1 | @use "sass:math";
2 |
3 | // Base
4 | $rem-base: 16px;
5 | $base-line-height: 1;
6 |
7 | // Application Colors
8 |
9 | // variable
10 | // Grid breakpoints
11 | //
12 | // Define the minimum dimensions at which your layout will change,
13 | // adapting to different screen sizes, for use in media queries.
14 | // scss-docs-start grid-breakpoints
15 | $grid-breakpoints: (
16 | xs: 0,
17 | sm: 576px,
18 | md: 768px,
19 | mlg: 911px,
20 | lg: 992px,
21 | xl: 1200px,
22 | xxl: 1400px,
23 | ) !default;
24 | // scss-docs-end grid-breakpoints
25 |
26 | // Application Colors
27 | $clr-black: #282931;
28 | $clr-white: #fff;
29 | $clr-gray: #59585a;
30 | $clr-dark-gray: #393939;
31 | $clr-slate-gray: #2d3242;
32 | $clr-charcoal-gray: #1e212d;
33 | $clr-orange: #ff6847;
34 | $clr-purple: #9747ff;
--------------------------------------------------------------------------------
/src/utils/index.tsx:
--------------------------------------------------------------------------------
1 | export const truncateAddress = (address: any) => {
2 | if (!address) return "No Account";
3 | const match = address.match(
4 | /^(0x[a-zA-Z0-9]{2})[a-zA-Z0-9]+([a-zA-Z0-9]{2})$/
5 | );
6 | if (!match) return address;
7 | return `${match[1]}…${match[2]}`;
8 | };
9 |
10 | export const toHex = (num: string) => {
11 | const val = Number(num);
12 | return "0x" + val.toString(16);
13 | };
14 |
15 | export const fromHex = (num: number) => {
16 | return num.toString(10);
17 | }
18 |
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | content: ["./src/**/*.{js,jsx,ts,tsx}"],
3 | theme: {
4 | extend: {
5 | maxWidth: {
6 | "screen-lgx": "1100px",
7 | },
8 | minWidth: {
9 | 15: "15rem",
10 | },
11 | gap: {
12 | '11': '2.75rem',
13 | }
14 | },
15 | container: {
16 | screens: {
17 | sm: "100%",
18 | md: "100%",
19 | },
20 | },
21 | screens: {
22 | sm: "576px",
23 |
24 | smx: { max: "576px" },
25 | // => @media (min-width: 576px) { ... }
26 |
27 | md: "768px",
28 | // => @media (min-width: 768px) { ... }
29 |
30 | mdx: { max: "768px" },
31 |
32 | mlg: "911px",
33 | // => @media (min-width: 911px) { ... }
34 |
35 | mlgx: { max: "910px" },
36 | // => @media (max-width: 910px) { ... }
37 |
38 | lg: "992px",
39 | // => @media (min-width: 992px) { ... }
40 |
41 | xl: "1200px",
42 | // => @media (min-width: 1200px) { ... }
43 |
44 | "2xl": "1400px",
45 | // => @media (min-width: 1400px) { ... }
46 | },
47 | },
48 | plugins: [],
49 | };
50 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext",
8 | "ES2015",
9 | "ES2020",
10 | "DOM"
11 | ],
12 | "allowJs": true,
13 | "skipLibCheck": true,
14 | "esModuleInterop": true,
15 | "allowSyntheticDefaultImports": true,
16 | "strict": true,
17 | "forceConsistentCasingInFileNames": true,
18 | "noFallthroughCasesInSwitch": true,
19 | "module": "esnext",
20 | "moduleResolution": "node",
21 | "resolveJsonModule": true,
22 | "isolatedModules": true,
23 | "useUnknownInCatchVariables": true,
24 | "noEmit": true,
25 | "jsx": "react-jsx"
26 | },
27 | "include": [
28 | "src",
29 | "types"
30 | ],
31 | "files": [
32 | "src/declaration.d.ts"
33 | ],
34 | "theme": {
35 | "extend": {
36 | "gridColumn": {
37 | "span-3": "span 3 / span 3",
38 | "span-4": "span 4 / span 4",
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------