diff --git a/bun.lockb b/bun.lockb index 7971d2d..3e290cb 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 73ad9c4..65cb6cd 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,10 @@ "preview": "vite preview" }, "dependencies": { - "@cartridge/connector": "^0.3.38", + "@cartridge/connector": "^0.3.40", "@fontsource/vt323": "^5.0.13", - "@starknet-react/core": "^2.9.0", + "buffer": "^6.0.3", + "canvas-confetti": "^1.9.3", "class-variance-authority": "^0.7.0", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -23,6 +24,8 @@ }, "devDependencies": { "@eslint/js": "^9.8.0", + "@types/canvas-confetti": "^1.6.4", + "@types/node": "^22.4.1", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@vitejs/plugin-react": "^4.3.1", @@ -35,6 +38,7 @@ "tailwindcss": "^3.4.9", "typescript": "^5.5.3", "typescript-eslint": "^8.0.0", - "vite": "^5.4.0" + "vite": "^5.4.0", + "vite-plugin-mkcert": "^1.17.6" } } diff --git a/public/animations/coin-sprites.png b/public/animations/coin-sprites.png new file mode 100644 index 0000000..b5d755c Binary files /dev/null and b/public/animations/coin-sprites.png differ diff --git a/public/icons/cartridge.svg b/public/icons/cartridge.svg new file mode 100644 index 0000000..1d89f69 --- /dev/null +++ b/public/icons/cartridge.svg @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/public/icons/chevron.svg b/public/icons/chevron.svg new file mode 100644 index 0000000..a64ed90 --- /dev/null +++ b/public/icons/chevron.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/public/icons/twitter.svg b/public/icons/twitter.svg new file mode 100644 index 0000000..7a1d67e --- /dev/null +++ b/public/icons/twitter.svg @@ -0,0 +1,25 @@ + diff --git a/public/scenes/fountain.png b/public/scenes/fountain.png new file mode 100644 index 0000000..406e5bd Binary files /dev/null and b/public/scenes/fountain.png differ diff --git a/public/scenes/opening.png b/public/scenes/opening.png new file mode 100644 index 0000000..155c1dc Binary files /dev/null and b/public/scenes/opening.png differ diff --git a/src/App.tsx b/src/App.tsx index 3bcd177..f825b36 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,105 +1,39 @@ -import React from "react"; -import { Button } from "./components/Button"; -import { useUiSounds, soundSelector } from "./hooks/useUiSound"; -import { useAccount, useConnect, useDisconnect } from "@starknet-react/core"; -import { getWalletConnectors } from "./lib/connectors"; -import { CompleteIcon } from "./components/Icons"; -import { COLLECTIONS_MAP } from "./lib/constants"; -import { displayAddress } from "./lib/utils"; +import { useEffect } from "react"; import Head from "./head"; +import Claim from "./containers/Claim"; +import Claimed from "./containers/Claimed"; +import Claiming from "./containers/Claiming"; +import { useUIStore } from "./hooks/useUIStore"; +import { networkConfig } from "./lib/networkConfig"; +import { fetchAdventurerMetadata } from "./api/fetchMetadata"; +import { Network } from "./lib/types"; const App = () => { - const { play: clickPlay } = useUiSounds(soundSelector.click); - - const { connectors, connect } = useConnect(); - const { disconnect } = useDisconnect(); - const { address } = useAccount(); - - const walletConnectors = getWalletConnectors(connectors); - - const unclaimedCollectionsByOwnerData = [ - { - token: "0x1", - tokenId: 1, - claimed: false, - }, - { - token: "0x1", - tokenId: 2, - claimed: false, - }, - { - token: "0x2", - tokenId: 1, - claimed: false, - }, - ]; - - const getCollectionFreeGames = (token: string) => { - return unclaimedCollectionsByOwnerData.filter( - (item) => item.token === token - ); - }; - - const renderCollection = (token: string, image: string, alt: string) => { - const freeGames = getCollectionFreeGames(token); - return ( -
Collections
- {!address && ( -- {displayAddress(address ?? "")} -
- )} -Check Eligibility
-- 10 Free Games Claimable -
- - -