Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new landing page for the tea token sale on CoinList, accessible at /coinlist on the pkgx.dev website. The page promotes early access to the tea token sale and provides information about the project's open source mission.
- New CoinList landing page component with hero section, countdown timer, and email signup form
- Integration of the new page into the main routing system
- Responsive design with Material-UI components and form handling for user engagement
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/pkgx.dev/CoinListLandingPage.tsx |
Complete landing page implementation with countdown timer, feature highlights, and email signup functionality |
src/pkgx.dev.tsx |
Added routing for the new /coinlist path and imported the landing page component |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| const [email, setEmail] = useState(""); | ||
| const [formEmail, setFormEmail] = useState(""); | ||
| const [isDeveloper, setIsDeveloper] = useState(false); | ||
| const [recaptchaToken, setRecaptchaToken] = useState<string | null>("dummy-token"); // Simplified for demo |
There was a problem hiding this comment.
Using a hardcoded 'dummy-token' for reCAPTCHA in production code poses a security risk as it bypasses spam protection. The reCAPTCHA integration should be properly implemented before deployment.
| const handleSubscribe = (e: React.FormEvent) => { | ||
| e.preventDefault(); | ||
| if (!email) return; | ||
| alert(`Thanks! We'll keep you posted at ${email}.`); | ||
| setEmail(""); | ||
| }; |
There was a problem hiding this comment.
The handleSubscribe function and related email state appear to be unused code. The actual form submission is handled by handleFormSubmit which uses formEmail state. This unused code should be removed to avoid confusion.
| formData.append('field[5]', isDeveloper ? 'Yes' : 'No'); | ||
| formData.append('g-recaptcha-response', recaptchaToken || ''); | ||
|
|
||
| const response = await fetch('https://teaxyz.activehosted.com/proc.php', { |
There was a problem hiding this comment.
The hardcoded API endpoint URL should be moved to an environment variable or configuration file to allow for different environments (development, staging, production) and improve security practices.
New page on https://pkgx.dev/coinlist