Skip to content

Commit a8208fb

Browse files
authored
Merge pull request #5 from NikoManiac/refactor/create-page
refactor: create page
2 parents 47453ee + 50d4ee0 commit a8208fb

11 files changed

+282
-267
lines changed

.eslintrc

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{
2+
"parser": "@typescript-eslint/parser",
23
"env": {
34
"browser": true,
45
"es2021": true
56
},
67
"extends": [
78
"plugin:react/recommended",
8-
"standard",
9+
"plugin:@typescript-eslint/eslint-recommended",
10+
"plugin:@typescript-eslint/recommended",
911
"prettier",
1012
"next/core-web-vitals"
1113
],
@@ -16,7 +18,7 @@
1618
"ecmaVersion": 12,
1719
"sourceType": "module"
1820
},
19-
"plugins": ["react"],
21+
"plugins": ["react","@typescript-eslint"],
2022
"rules": {
2123
"@next/next/no-img-element": "off"
2224
}

components/InputFieldError.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
interface InputFieldErrorProps {
3+
message?: string
4+
}
5+
6+
export const InputFieldError = ({ message }: InputFieldErrorProps) => {
7+
if (!message) return null
8+
return <p className="text-red-500">{message}</p>
9+
}

next-env.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

package.json

+18-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@
66
"dev": "next dev",
77
"build": "next build",
88
"start": "export PORT=4006 next start",
9-
"lint": "next lint"
9+
"lint": "next lint --fix"
1010
},
1111
"dependencies": {
1212
"@headlessui/react": "^1.4.2",
1313
"@heroicons/react": "^1.0.5",
14+
"@hookform/resolvers": "^2.8.5",
15+
"@openzeppelin/contracts": "^4.4.1",
16+
"@react-hookz/web": "^12.0.4",
1417
"@textile/eth-storage": "^1.0.0",
1518
"axios": "^0.24.0",
1619
"ethers": "^5.5.2",
@@ -22,16 +25,27 @@
2225
"nft.storage": "^5.2.0",
2326
"react": "^17.0.2",
2427
"react-dom": "^17.0.2",
28+
"react-hook-form": "^7.22.5",
2529
"react-markdown": "^7.1.1",
26-
"web3modal": "^1.9.4"
30+
"web3modal": "^1.9.4",
31+
"yup": "^0.32.11"
2732
},
2833
"devDependencies": {
34+
"@nomiclabs/hardhat-ethers": "^2.0.3",
35+
"@nomiclabs/hardhat-waffle": "^2.0.1",
36+
"@types/react": "^17.0.38",
37+
"@typescript-eslint/eslint-plugin": "^5.8.1",
38+
"@typescript-eslint/parser": "^5.8.1",
2939
"autoprefixer": "^10.4.0",
30-
"eslint": "^7.32.0",
40+
"chai": "^4.3.4",
41+
"eslint": "^8.5.0",
3142
"eslint-config-next": "^12.0.7",
3243
"eslint-config-prettier": "^8.3.0",
44+
"ethereum-waffle": "^3.4.0",
45+
"hardhat": "^2.8.0",
3346
"postcss": "^8.4.5",
3447
"prettier": "2.5.1",
35-
"tailwindcss": "^3.0.7"
48+
"tailwindcss": "^3.0.7",
49+
"typescript": "^4.5.4"
3650
}
3751
}

pages/create.js

-260
This file was deleted.

0 commit comments

Comments
 (0)