diff --git a/.github/workflows/static.yaml b/.github/workflows/static.yaml index a2c3e80c..868deafc 100644 --- a/.github/workflows/static.yaml +++ b/.github/workflows/static.yaml @@ -25,7 +25,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 - + - name: Install dependencies uses: bahmutov/npm-install@v1 with: @@ -41,9 +41,8 @@ jobs: - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: './www/dist' + path: "./www/dist" - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 - diff --git a/www/package.json b/www/package.json index 2c19e454..14a2923e 100644 --- a/www/package.json +++ b/www/package.json @@ -5,8 +5,8 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vite build", - "lint": "eslint .", + "build": "tsc -b && vite build", + "lint": "eslint . && tsc -b", "preview": "vite preview" }, "dependencies": { diff --git a/www/src/App.tsx b/www/src/App.tsx index 6782d5d2..a16332df 100644 --- a/www/src/App.tsx +++ b/www/src/App.tsx @@ -1,10 +1,3 @@ -// const defaultVerifyFormData = { -// address: "bc1ppv609nr0vr25u07u95waq5lucwfm6tde4nydujnu8npg4q75mr5sxq8lt3", -// message: "Hello World", -// signature: -// "AUHd69PrJQEv+oKTfZ8l+WROBHuy9HKrbFCJu7U1iK2iiEy1vMU5EfMtjc+VSHM7aU0SDbak5IUZRVno2P5mjSafAQ==", -// }; - import { useEffect, useState } from "react"; import { useLaserEyes, diff --git a/www/src/components/AnimatedContainer.tsx b/www/src/components/AnimatedContainer.tsx index 0a76accd..17441b3f 100644 --- a/www/src/components/AnimatedContainer.tsx +++ b/www/src/components/AnimatedContainer.tsx @@ -1,13 +1,21 @@ import { useRef, useEffect, useState } from "react"; -const AnimatedContainer = ({ children, isExpanded }) => { - const contentRef = useRef(null); +interface AnimatedContainerProps { + children: React.ReactNode; + isExpanded: boolean; +} + +const AnimatedContainer: React.FC = ({ + children, + isExpanded, +}) => { + const contentRef = useRef() as React.MutableRefObject; const [height, setHeight] = useState("calc(var(--font-large) + 3rem)"); useEffect(() => { const rafId = requestAnimationFrame(() => { if (contentRef.current) { - const newHeight = contentRef.current.scrollHeight; + const newHeight = contentRef.current?.scrollHeight; setHeight( isExpanded ? `${newHeight}px` : "calc(var(--font-large) + 3rem)" ); diff --git a/www/src/components/ConnectWallet.tsx b/www/src/components/ConnectWallet.tsx index a4e42130..d3a27d75 100644 --- a/www/src/components/ConnectWallet.tsx +++ b/www/src/components/ConnectWallet.tsx @@ -1,32 +1,22 @@ import { Button } from "@/components/ui/button"; -import { - SUPPORTED_WALLETS, - WalletIcon, - UNISAT, - MAGIC_EDEN, - OYL, - PHANTOM, - LEATHER, - XVERSE, - OKX, -} from "@omnisat/lasereyes"; +import { SUPPORTED_WALLETS, WalletIcon } from "@omnisat/lasereyes"; import FormWrapper from "./FormWrapper"; +type WalletName = + | "unisat" + | "magic-eden" + | "oyl" + | "phantom" + | "leather" + | "xverse" + | "okx"; + interface ConnectWalletFormProps { provider: string | null; hasWallet: { [key: string]: boolean; }; - onConnect: ( - walletName: - | typeof UNISAT - | typeof MAGIC_EDEN - | typeof OYL - | typeof PHANTOM - | typeof LEATHER - | typeof XVERSE - | typeof OKX - ) => Promise; + onConnect: (walletName: WalletName) => Promise; onDisconnect: () => void; } const ConnectWalletForm = ({ @@ -48,35 +38,40 @@ const ConnectWalletForm = ({ return (
- {Object.values(SUPPORTED_WALLETS).map((wallet) => { - const isMissingWallet = !hasWallet[wallet.name]; - return ( - - ); - })} + + )} +
+ ); + })}
);