diff --git a/package-lock.json b/package-lock.json index 731bdcc0..3db6a754 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,10 +16,9 @@ "@coingecko/cryptoformat": "^0.6.0", "@nanostores/query": "^0.2.4", "@nanostores/react": "^0.7.1", - "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-select": "^2.0.0", "@rainbow-me/rainbowkit": "^1.1.3", - "astro": "3.3.4", + "astro": "3.4.0", "astro-expressive-code": "^0.26.2", "astro-redirect-from": "^1.0.4", "date-fns": "^2.30.0", @@ -35,7 +34,7 @@ "react-dom": "^18.2.0", "slugify": "^1.6.6", "use-debounce": "^9.0.4", - "viem": "^1.16.6", + "viem": "^1.18.0", "wagmi": "^1.4.5" }, "devDependencies": { @@ -2351,67 +2350,6 @@ } } }, - "node_modules/@radix-ui/react-popover": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.0.7.tgz", - "integrity": "sha512-shtvVnlsxT6faMnK/a7n0wptwBD23xc1Z5mdrtKLwVEfsEMXodS0r5s0/g5P0hX//EKYZS2sxUjqfzlg52ZSnQ==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-dismissable-layer": "1.0.5", - "@radix-ui/react-focus-guards": "1.0.1", - "@radix-ui/react-focus-scope": "1.0.4", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-popper": "1.1.3", - "@radix-ui/react-portal": "1.0.4", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-slot": "1.0.2", - "@radix-ui/react-use-controllable-state": "1.0.1", - "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.5.5" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz", - "integrity": "sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==", - "dependencies": { - "react-remove-scroll-bar": "^2.3.3", - "react-style-singleton": "^2.2.1", - "tslib": "^2.1.0", - "use-callback-ref": "^1.3.0", - "use-sidecar": "^1.1.2" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-popper": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.3.tgz", @@ -2467,30 +2405,6 @@ } } }, - "node_modules/@radix-ui/react-presence": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.1.tgz", - "integrity": "sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-use-layout-effect": "1.0.1" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-primitive": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz", @@ -5367,9 +5281,9 @@ } }, "node_modules/astro": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/astro/-/astro-3.3.4.tgz", - "integrity": "sha512-1yy1p8/QpACpToK2bYFxbbPug7+HeUW+IGvkIss2KQDv4pwDk19UbfQrS8aMHtW3nvR7PpBYL/H/Dprcqxy40A==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/astro/-/astro-3.4.0.tgz", + "integrity": "sha512-nTOFxrPOnmACl8noTPkRJkaEOMx4wZy4QCLB2aDL3Lm+AiEaVcgH7YQ4GpCl72zSNXp/A7hGdUgcXbC4XYHOCQ==", "dependencies": { "@astrojs/compiler": "^2.1.0", "@astrojs/internal-helpers": "0.2.1", @@ -5408,6 +5322,7 @@ "mime": "^3.0.0", "ora": "^7.0.1", "p-limit": "^4.0.0", + "p-queue": "^7.4.1", "path-to-regexp": "^6.2.1", "preferred-pm": "^3.1.2", "probe-image-size": "^7.2.3", @@ -14163,6 +14078,37 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-queue": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-7.4.1.tgz", + "integrity": "sha512-vRpMXmIkYF2/1hLBKisKeVYJZ8S2tZ0zEAmIJgdVKP2nq0nh4qCdf8bgw+ZgKrkh71AOCaqzwbJJk1WtdcF3VA==", + "dependencies": { + "eventemitter3": "^5.0.1", + "p-timeout": "^5.0.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-queue/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + }, + "node_modules/p-timeout": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz", + "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -19337,9 +19283,9 @@ "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==" }, "node_modules/viem": { - "version": "1.16.6", - "resolved": "https://registry.npmjs.org/viem/-/viem-1.16.6.tgz", - "integrity": "sha512-jcWcFQ+xzIfDwexwPJRvCuCRJKEkK9iHTStG7mpU5MmuSBpACs4nATBDyXNFtUiyYTFzLlVEwWkt68K0nCSImg==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/viem/-/viem-1.18.0.tgz", + "integrity": "sha512-NeKi5RFj7fHdsnk5pojivHFLkTyBWyehxeSE/gSPTDJKCWnR9i+Ra0W++VwN5ghciEG55O8b4RdpYhzGmhnr7A==", "funding": [ { "type": "github", diff --git a/package.json b/package.json index d19416ff..1d1e18fa 100644 --- a/package.json +++ b/package.json @@ -49,10 +49,9 @@ "@coingecko/cryptoformat": "^0.6.0", "@nanostores/query": "^0.2.4", "@nanostores/react": "^0.7.1", - "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-select": "^2.0.0", "@rainbow-me/rainbowkit": "^1.1.3", - "astro": "3.3.4", + "astro": "3.4.0", "astro-expressive-code": "^0.26.2", "astro-redirect-from": "^1.0.4", "date-fns": "^2.30.0", @@ -68,7 +67,7 @@ "react-dom": "^18.2.0", "slugify": "^1.6.6", "use-debounce": "^9.0.4", - "viem": "^1.16.6", + "viem": "^1.18.0", "wagmi": "^1.4.5" }, "devDependencies": { diff --git a/src/components/Sponsor/Coin.astro b/src/components/Coin.astro similarity index 100% rename from src/components/Sponsor/Coin.astro rename to src/components/Coin.astro diff --git a/src/components/Header/index.astro b/src/components/Header/index.astro index 36989bad..bc58f04a 100644 --- a/src/components/Header/index.astro +++ b/src/components/Header/index.astro @@ -1,6 +1,6 @@ --- import Menu from '@components/Menu/index.astro' -import Search from '@components/Search/index.astro' +import Search from '@features/Search/index.astro' import ThemeSwitch from '@components/ThemeSwitch/index.astro' import { Logo } from '@images/components' import styles from './index.module.css' diff --git a/src/components/Search/Results/Empty.module.css b/src/features/Search/Results/Empty.module.css similarity index 100% rename from src/components/Search/Results/Empty.module.css rename to src/features/Search/Results/Empty.module.css diff --git a/src/components/Search/Results/Empty.tsx b/src/features/Search/Results/Empty.tsx similarity index 100% rename from src/components/Search/Results/Empty.tsx rename to src/features/Search/Results/Empty.tsx diff --git a/src/components/Search/Results/index.module.css b/src/features/Search/Results/index.module.css similarity index 100% rename from src/components/Search/Results/index.module.css rename to src/features/Search/Results/index.module.css diff --git a/src/components/Search/Results/index.tsx b/src/features/Search/Results/index.tsx similarity index 100% rename from src/components/Search/Results/index.tsx rename to src/features/Search/Results/index.tsx diff --git a/src/components/Search/Search.module.css b/src/features/Search/Search.module.css similarity index 100% rename from src/components/Search/Search.module.css rename to src/features/Search/Search.module.css diff --git a/src/components/Search/Search.test.tsx b/src/features/Search/Search.test.tsx similarity index 100% rename from src/components/Search/Search.test.tsx rename to src/features/Search/Search.test.tsx diff --git a/src/components/Search/Search.tsx b/src/features/Search/Search.tsx similarity index 100% rename from src/components/Search/Search.tsx rename to src/features/Search/Search.tsx diff --git a/src/components/Search/index.astro b/src/features/Search/index.astro similarity index 100% rename from src/components/Search/index.astro rename to src/features/Search/index.astro diff --git a/src/components/Sponsor/Web3Donation/components/Alert/Alert.module.css b/src/features/Web3/components/Alert/Alert.module.css similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Alert/Alert.module.css rename to src/features/Web3/components/Alert/Alert.module.css diff --git a/src/components/Sponsor/Web3Donation/components/Alert/Alert.test.tsx b/src/features/Web3/components/Alert/Alert.test.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Alert/Alert.test.tsx rename to src/features/Web3/components/Alert/Alert.test.tsx diff --git a/src/components/Sponsor/Web3Donation/components/Alert/Alert.tsx b/src/features/Web3/components/Alert/Alert.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Alert/Alert.tsx rename to src/features/Web3/components/Alert/Alert.tsx diff --git a/src/components/Sponsor/Web3Donation/components/Conversion/Conversion.module.css b/src/features/Web3/components/Conversion/Conversion.module.css similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Conversion/Conversion.module.css rename to src/features/Web3/components/Conversion/Conversion.module.css diff --git a/src/components/Sponsor/Web3Donation/components/Conversion/Conversion.test.tsx b/src/features/Web3/components/Conversion/Conversion.test.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Conversion/Conversion.test.tsx rename to src/features/Web3/components/Conversion/Conversion.test.tsx diff --git a/src/components/Sponsor/Web3Donation/components/Conversion/Conversion.tsx b/src/features/Web3/components/Conversion/Conversion.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Conversion/Conversion.tsx rename to src/features/Web3/components/Conversion/Conversion.tsx diff --git a/src/components/Sponsor/Web3Donation/components/Conversion/index.tsx b/src/features/Web3/components/Conversion/index.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Conversion/index.tsx rename to src/features/Web3/components/Conversion/index.tsx diff --git a/src/components/Sponsor/Web3Donation/index.module.css b/src/features/Web3/components/Form/index.module.css similarity index 100% rename from src/components/Sponsor/Web3Donation/index.module.css rename to src/features/Web3/components/Form/index.module.css diff --git a/src/components/Sponsor/Web3Donation/index.test.tsx b/src/features/Web3/components/Form/index.test.tsx similarity index 91% rename from src/components/Sponsor/Web3Donation/index.test.tsx rename to src/features/Web3/components/Form/index.test.tsx index 815c0899..323f1eff 100644 --- a/src/components/Sponsor/Web3Donation/index.test.tsx +++ b/src/features/Web3/components/Form/index.test.tsx @@ -1,9 +1,9 @@ import { test, expect } from 'vitest' import { render, fireEvent, screen, waitFor } from '@testing-library/react' -import Web3Donation from '.' +import Web3Form from '.' test('Web3Donation component', async () => { - render() + render() const submitButton = screen.getByRole('button') expect(submitButton).toBeInTheDocument() diff --git a/src/components/Sponsor/Web3Donation/index.tsx b/src/features/Web3/components/Form/index.tsx similarity index 89% rename from src/components/Sponsor/Web3Donation/index.tsx rename to src/features/Web3/components/Form/index.tsx index 096a60a4..69fe04f2 100644 --- a/src/components/Sponsor/Web3Donation/index.tsx +++ b/src/features/Web3/components/Form/index.tsx @@ -2,13 +2,13 @@ import { type ReactElement, useState, useEffect } from 'react' import { useDebounce } from 'use-debounce' import { useAccount } from 'wagmi' import { ConnectButton } from '@rainbow-me/rainbowkit' -import Alert, { getTransactionMessage } from './components/Alert/Alert' -import { InputGroup } from './components/Input' +import Alert, { getTransactionMessage } from '../Alert/Alert' +import { InputGroup } from '../Input' import styles from './index.module.css' -import { SendNative, SendErc20 } from './components/Send' -import type { GetToken } from './hooks/useTokens' +import { SendNative, SendErc20 } from '../Send' +import type { GetToken } from '../../hooks/useTokens' -export default function Web3Donation(): ReactElement { +export default function Web3Form(): ReactElement { const { address: account } = useAccount() const [amount, setAmount] = useState('') diff --git a/src/components/Sponsor/Web3Donation/components/Input/InputGroup.module.css b/src/features/Web3/components/Input/InputGroup.module.css similarity index 90% rename from src/components/Sponsor/Web3Donation/components/Input/InputGroup.module.css rename to src/features/Web3/components/Input/InputGroup.module.css index 645fc329..0a3b304a 100644 --- a/src/components/Sponsor/Web3Donation/components/Input/InputGroup.module.css +++ b/src/features/Web3/components/Input/InputGroup.module.css @@ -6,13 +6,6 @@ display: flex; } -/* @media (min-width: 40rem) { - .inputGroup { - display: flex; - flex-wrap: wrap; - } -} */ - .token { width: 80px; background: var(--box-background-color); @@ -66,12 +59,13 @@ } .message { - composes: message from '../../index.module.css'; + composes: message from '../Form/index.module.css'; } .disclaimer { font-size: var(--font-size-mini); color: var(--text-color-light); + margin-top: calc(var(--spacer) / 3); } .disclaimer code { diff --git a/src/components/Sponsor/Web3Donation/components/Input/InputGroup.test.tsx b/src/features/Web3/components/Input/InputGroup.test.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Input/InputGroup.test.tsx rename to src/features/Web3/components/Input/InputGroup.test.tsx diff --git a/src/components/Sponsor/Web3Donation/components/Input/InputGroup.tsx b/src/features/Web3/components/Input/InputGroup.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Input/InputGroup.tsx rename to src/features/Web3/components/Input/InputGroup.tsx diff --git a/src/components/Sponsor/Web3Donation/components/Input/index.tsx b/src/features/Web3/components/Input/index.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Input/index.tsx rename to src/features/Web3/components/Input/index.tsx diff --git a/src/components/Sponsor/Web3Donation/components/Send/SendErc20.tsx b/src/features/Web3/components/Send/SendErc20.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Send/SendErc20.tsx rename to src/features/Web3/components/Send/SendErc20.tsx diff --git a/src/components/Sponsor/Web3Donation/components/Send/SendNative.tsx b/src/features/Web3/components/Send/SendNative.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Send/SendNative.tsx rename to src/features/Web3/components/Send/SendNative.tsx diff --git a/src/components/Sponsor/Web3Donation/components/Send/abiErc20Transfer.ts b/src/features/Web3/components/Send/abiErc20Transfer.ts similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Send/abiErc20Transfer.ts rename to src/features/Web3/components/Send/abiErc20Transfer.ts diff --git a/src/components/Sponsor/Web3Donation/components/Send/index.tsx b/src/features/Web3/components/Send/index.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Send/index.tsx rename to src/features/Web3/components/Send/index.tsx diff --git a/src/components/Sponsor/Web3Donation/components/Tokens/Token.css b/src/features/Web3/components/Tokens/Token.css similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Tokens/Token.css rename to src/features/Web3/components/Tokens/Token.css diff --git a/src/components/Sponsor/Web3Donation/components/Tokens/Token.tsx b/src/features/Web3/components/Tokens/Token.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Tokens/Token.tsx rename to src/features/Web3/components/Tokens/Token.tsx diff --git a/src/components/Sponsor/Web3Donation/components/Tokens/TokenLoading.css b/src/features/Web3/components/Tokens/TokenLoading.css similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Tokens/TokenLoading.css rename to src/features/Web3/components/Tokens/TokenLoading.css diff --git a/src/components/Sponsor/Web3Donation/components/Tokens/TokenLoading.tsx b/src/features/Web3/components/Tokens/TokenLoading.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Tokens/TokenLoading.tsx rename to src/features/Web3/components/Tokens/TokenLoading.tsx diff --git a/src/components/Sponsor/Web3Donation/components/Tokens/TokenSelect.css b/src/features/Web3/components/Tokens/TokenSelect.css similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Tokens/TokenSelect.css rename to src/features/Web3/components/Tokens/TokenSelect.css diff --git a/src/components/Sponsor/Web3Donation/components/Tokens/TokenSelect.tsx b/src/features/Web3/components/Tokens/TokenSelect.tsx similarity index 95% rename from src/components/Sponsor/Web3Donation/components/Tokens/TokenSelect.tsx rename to src/features/Web3/components/Tokens/TokenSelect.tsx index 0074c898..f2d4e096 100644 --- a/src/components/Sponsor/Web3Donation/components/Tokens/TokenSelect.tsx +++ b/src/features/Web3/components/Tokens/TokenSelect.tsx @@ -2,10 +2,9 @@ import * as Select from '@radix-ui/react-select' import './TokenSelect.css' import { Token } from './Token' import { ChevronDown, ChevronsDown, ChevronsUp } from '@images/components/react' -import { useTokens } from '../../hooks/useTokens/useTokens' import { TokenLoading } from './TokenLoading' import { useEffect } from 'react' -import type { GetToken } from '../../hooks/useTokens' +import { useTokens, type GetToken } from '../../hooks/useTokens' import { useAccount, useNetwork } from 'wagmi' export function TokenSelect({ diff --git a/src/components/Sponsor/Web3Donation/components/Tokens/index.tsx b/src/features/Web3/components/Tokens/index.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/components/Tokens/index.tsx rename to src/features/Web3/components/Tokens/index.tsx diff --git a/src/components/Sponsor/Web3.tsx b/src/features/Web3/components/Web3.tsx similarity index 52% rename from src/components/Sponsor/Web3.tsx rename to src/features/Web3/components/Web3.tsx index 36c0b921..f843c4ec 100644 --- a/src/components/Sponsor/Web3.tsx +++ b/src/features/Web3/components/Web3.tsx @@ -1,14 +1,13 @@ -import Web3Donation from './Web3Donation' import { RainbowKitProvider } from '@rainbow-me/rainbowkit' import { WagmiConfig } from 'wagmi' -import { wagmiConfig, chains, theme } from './Web3Donation/lib/rainbowkit' -import type { ReactElement } from 'react' +import { wagmiConfig, chains, theme } from '../lib/rainbowkit' +import Web3Form from './Form' -export default function Web3(): ReactElement { +export function Web3() { return ( - + ) diff --git a/src/components/Sponsor/Web3Donation/hooks/useTokens/getTokens.ts b/src/features/Web3/hooks/useTokens/getTokens.ts similarity index 100% rename from src/components/Sponsor/Web3Donation/hooks/useTokens/getTokens.ts rename to src/features/Web3/hooks/useTokens/getTokens.ts diff --git a/src/components/Sponsor/Web3Donation/hooks/useTokens/index.tsx b/src/features/Web3/hooks/useTokens/index.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/hooks/useTokens/index.tsx rename to src/features/Web3/hooks/useTokens/index.tsx diff --git a/src/components/Sponsor/Web3Donation/hooks/useTokens/types.ts b/src/features/Web3/hooks/useTokens/types.ts similarity index 100% rename from src/components/Sponsor/Web3Donation/hooks/useTokens/types.ts rename to src/features/Web3/hooks/useTokens/types.ts diff --git a/src/components/Sponsor/Web3Donation/hooks/useTokens/useTokens.tsx b/src/features/Web3/hooks/useTokens/useTokens.tsx similarity index 100% rename from src/components/Sponsor/Web3Donation/hooks/useTokens/useTokens.tsx rename to src/features/Web3/hooks/useTokens/useTokens.tsx diff --git a/src/features/Web3/index.tsx b/src/features/Web3/index.tsx new file mode 100644 index 00000000..5db1a152 --- /dev/null +++ b/src/features/Web3/index.tsx @@ -0,0 +1 @@ +export * from './components/Web3' diff --git a/src/components/Sponsor/Web3Donation/lib/rainbowkit.ts b/src/features/Web3/lib/rainbowkit.ts similarity index 100% rename from src/components/Sponsor/Web3Donation/lib/rainbowkit.ts rename to src/features/Web3/lib/rainbowkit.ts diff --git a/src/pages/thanks.astro b/src/pages/thanks.astro index 8a4d7a22..c8c98702 100644 --- a/src/pages/thanks.astro +++ b/src/pages/thanks.astro @@ -1,9 +1,9 @@ --- import BackButton from '@components/BackButton.astro' import LayoutBase from '@layouts/Base/index.astro' -import Web3 from '@components/Sponsor/Web3' +import { Web3 } from '@features/Web3' import config from '@config/blog.config' -import Coin from '@components/Sponsor/Coin.astro' +import Coin from '@components/Coin.astro' const coins = Object.entries(config.author).filter( ([key]) => key === 'bitcoin' || key === 'ether' @@ -51,3 +51,4 @@ const coins = Object.entries(config.author).filter( } + @components/Sponsor/Web3/Web3 @components/Web3 diff --git a/tsconfig.json b/tsconfig.json index 6fe8bdd5..63f4fd5f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,6 +7,7 @@ "paths": { "@config/*": [".config/*"], "@components/*": ["src/components/*"], + "@features/*": ["src/features/*"], "@layouts/*": ["src/layouts/*"], "@images/*": ["src/images/*"], "@lib/*": ["src/lib/*"],