This app has been organized into reusable components for better maintainability and code organization.
Header.tsx- Wallet connection header with OnchainKit wallet componentsSkateHiveAccountShop.tsx- Main shop component that orchestrates the purchase flowHiveAccountForm.tsx- Form for collecting username and emailBuyTransaction.tsx- OnchainKit transaction component for ETH paymentTransactionSuccess.tsx- Success message after payment confirmationOnchainKitLinks.tsx- Documentation links sectionconstants.ts- Configuration constants (price, recipient address, links)
- Modular Design: Each component has a single responsibility
- Type Safety: Full TypeScript support with proper interfaces
- Easy Configuration: All settings centralized in
constants.ts - Transaction Handling: Clean separation of transaction logic
- Responsive UI: Tailwind CSS for responsive design
Edit app/components/constants.ts to configure:
ACCOUNT_PRICE_ETH: Price for Hive account creationRECIPIENT_ADDRESS: Address to receive payments (⚠️ CHANGE THIS!)
The main App component in page.tsx is now clean and simple, importing and using the organized components.
- User fills form (username + email)
- User clicks buy button
- OnchainKit handles transaction
- Transaction success triggers alert + placeholder Hive account creation
- Success screen shows with option to create another account