Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination, Eslint & Context refactor #38

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
733af07
Refactoring to context
RyRy79261 Jun 23, 2021
d761425
Working pagination
RyRy79261 Jun 23, 2021
1cc289f
Environment vars working
RyRy79261 Jun 25, 2021
df68fb7
Broke out components
RyRy79261 Jun 25, 2021
21a989e
Manually styling
RyRy79261 Jun 25, 2021
408a347
Updated readme
RyRy79261 Jun 25, 2021
c76a652
Unoptimised fetching complete
RyRy79261 Jun 26, 2021
0e34f5b
Viewing & router done
RyRy79261 Jun 26, 2021
1d2a3f3
Inspect functional
RyRy79261 Jun 26, 2021
64d4acf
card
RyRy79261 Jun 26, 2021
31bbfbe
Update .env.template
RyRy79261 Jun 28, 2021
5129655
Update components/Address.tsx
RyRy79261 Jun 28, 2021
e7c54c1
Update components/Address.tsx
RyRy79261 Jun 28, 2021
c5f4488
Update components/bundles/Subbundle.tsx
RyRy79261 Jun 28, 2021
0676a8c
Update package.json
RyRy79261 Jun 28, 2021
de336b1
Update pages/index.tsx
RyRy79261 Jun 28, 2021
0101622
Update components/bundles/css/BundleOverview.module.css
RyRy79261 Jun 28, 2021
8aad749
Apply suggestions from code review
RyRy79261 Jun 28, 2021
1a96599
Update context/BundleData/BundleDataProvider.tsx
RyRy79261 Jun 28, 2021
c0f443b
Added comment
RyRy79261 Jun 28, 2021
3fcf9f0
Convert to rem
RyRy79261 Jun 28, 2021
4da55fb
Apply suggestions from code review
RyRy79261 Jun 28, 2021
338cbd0
Static generation happens regardless of consumtion, home removed
RyRy79261 Jun 28, 2021
bbeeb9b
Added lint changes
RyRy79261 Jun 28, 2021
2dd32f0
Merged & updated errors
RyRy79261 Jun 28, 2021
a85fc2c
Fixing deploy
RyRy79261 Jun 29, 2021
e6da4c2
Build different to dev
RyRy79261 Jun 29, 2021
8fe8a76
Intermittant issue not present
RyRy79261 Jun 29, 2021
fc4f8a7
Lines removed
RyRy79261 Jun 29, 2021
e89b41f
Consistent buttons
RyRy79261 Jun 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NEXT_PUBLIC_INFURA_ID=
FLASHBOTS_API_URL=https://blocks.flashbots.net/v1/blocks
RyRy79261 marked this conversation as resolved.
Show resolved Hide resolved
82 changes: 82 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": ["@typescript-eslint", "ternary"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:ternary/recommended"
],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"comma-spacing": ["error", { "before": false, "after": true }],
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "double"],
RyRy79261 marked this conversation as resolved.
Show resolved Hide resolved
"semi": ["error", "never"],
RyRy79261 marked this conversation as resolved.
Show resolved Hide resolved
"max-len": [
"error",
{
"code": 140
}
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/prop-types": 0,
"react/jsx-max-props-per-line": [2, {
"maximum": 1,
"when": "always"
}],
"react/jsx-fragments": "error",
"arrow-spacing": "error",
"space-infix-ops": "error",
"no-trailing-spaces": ["error", { "ignoreComments": true }],
"comma-dangle": ["error", "never"],
"object-curly-spacing": ["error", "always"],
"space-in-parens": ["error", "never"],
"ternary/no-unreachable": "off",
"ternary/nesting": "off",
"@typescript-eslint/no-unused-vars": "error",
RyRy79261 marked this conversation as resolved.
Show resolved Hide resolved
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/member-delimiter-style" : ["warn", {
"multiline": {
"delimiter": "none",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}]
},
"ignorePatterns": [
".github/**",
".vscode/**",
".yarn/**",
"**/dist/*",
"**/node_modules/*"
],
"env": {
"browser": true,
"amd": true,
"node": true
}
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ yarn-debug.log*
yarn-error.log*

# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@

Deployed at https://flashbots-explorer.marto.lol/

## Installation

Firstly, please run preferably `yarn` or alternatively `npm i` to install the dependancies

Then make a copy of the `.env.template` file and rename it to `.env`

For now, you dont need to make any changes to the file.

## Development
This is a create next app project so:

Expand Down
11 changes: 11 additions & 0 deletions components/Address.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react"
RyRy79261 marked this conversation as resolved.
Show resolved Hide resolved
export const Address = ({ address } : { address: string }) => {
const size = 6
const shorten = (address: string): string => address.slice(0, size) + "..." + address.slice(-size)
return <a className="flex text-sm justify-center hover:underline"
target="_blank"
rel="noreferrer"
href={`https://etherscan.io/address/${ address }`}>
<div className="text-sm text-gray-900">{ shorten(address) } </div>
</a>
}
RyRy79261 marked this conversation as resolved.
Show resolved Hide resolved
Loading