add husky

This commit is contained in:
tjs 2022-07-22 13:53:23 -04:00
parent 04393806df
commit a6b68cb00a
5 changed files with 21 additions and 5 deletions

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
yarn typecheck && yarn lint

View File

@ -107,8 +107,9 @@ const UserSetupModal = ({ isOpen, onClose }: ModalProps) => {
>
<h2 className="mb-1">Welcome.</h2>
<p className="mb-4">
You're seconds away from trading the most liquid dex markets on
Solana.
{
"You're seconds away from trading the most liquid dex markets on Solana."
}
</p>
<div className="mb-6 space-y-2 border-y border-th-bkg-4 py-4">
<div className="flex items-center space-x-2">
@ -137,7 +138,7 @@ const UserSetupModal = ({ isOpen, onClose }: ModalProps) => {
</div>
</div>
<Button className="w-full" onClick={handleNextStep} size="large">
Let's Go
{"Let's Go"}
</Button>
</Transition>
<Transition
@ -292,7 +293,10 @@ const UserSetupModal = ({ isOpen, onClose }: ModalProps) => {
</div>
<div className="space-y-2 pb-6">
{banks.map((bank) => (
<button className="grid w-full grid-cols-3 rounded-md border border-th-bkg-4 px-4 py-3 md:hover:border-th-fgd-4">
<button
key={bank.key}
className="grid w-full grid-cols-3 rounded-md border border-th-bkg-4 px-4 py-3 md:hover:border-th-fgd-4"
>
<div className="col-span-1 flex items-center">
<div className="mr-2.5 flex flex-shrink-0 items-center">
<Image

View File

@ -33,6 +33,7 @@ const WalletSelect = () => {
<div className="space-y-2">
{wallets?.map((w) => (
<button
key={w.adapter.name}
className={`flex w-full items-center justify-between rounded-md border ${
wallet?.adapter.name === w.adapter.name
? 'border-th-primary md:hover:border-th-primary'

View File

@ -7,7 +7,8 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"typecheck": "tsc"
"typecheck": "tsc",
"prepare": "husky install"
},
"dependencies": {
"@blockworks-foundation/mango-v4": "git+https://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:x-oauth-basic@github.com/blockworks-foundation/mango-v4.git",
@ -51,6 +52,7 @@
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.4.0",
"husky": "^8.0.1",
"postcss": "^8.4.12",
"prettier": "^2.6.2",
"prettier-plugin-tailwindcss": "^0.1.8",

View File

@ -2880,6 +2880,11 @@ human-signals@^2.1.0:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
husky@^8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.1.tgz#511cb3e57de3e3190514ae49ed50f6bc3f50b3e9"
integrity sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==
i18next-fs-backend@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/i18next-fs-backend/-/i18next-fs-backend-1.1.4.tgz#d0e9b9ed2fa7a0f11002d82b9fa69c3c3d6482da"