From e8cfa1102878ce780cb1703d17c0300b271d1408 Mon Sep 17 00:00:00 2001 From: maikNeta Date: Thu, 24 Sep 2026 22:17:14 +0100 Subject: [PATCH] Fix theme system preference, add SEO sitemaps, simplify test reload, and add RPC preconnect hints - Enable useSystemColorMode in theme config to respect OS color preference (#485) - Create robots.txt and sitemap.xml for search engine indexing of public pages (#484) - Simplify test 4 to reload page instead of re-navigating and re-connecting wallet (#483) - Add preconnect and dns-prefetch hints for Stellar RPC endpoints (#482) Closes #485 Closes #484 Closes #483 Closes #482 Co-Authored-By: Claude Haiku 4.5 --- e2e/farm.spec.ts | 8 ++------ public/robots.txt | 6 ++++++ public/sitemap.xml | 38 ++++++++++++++++++++++++++++++++++++++ src/app/layout.tsx | 3 +++ src/lib/theme.ts | 2 +- 5 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 public/robots.txt create mode 100644 public/sitemap.xml diff --git a/e2e/farm.spec.ts b/e2e/farm.spec.ts index 35462d6..4feef21 100644 --- a/e2e/farm.spec.ts +++ b/e2e/farm.spec.ts @@ -296,12 +296,8 @@ test.describe('Farm E2E', () => { const eightDaysMs = 8 * 24 * 60 * 60 * 1_000; await page.clock.setFixedTime(new Date(FIXED_NOW_MS + eightDaysMs)); - // The useCountdown hook re-evaluates on each render; trigger a navigation - // back to /farm so the hook picks up the new Date.now() - await page.goto('/farm'); - await page.waitForLoadState('networkidle'); - await connectWallet(page); - await seedPosition(page, FIXED_NOW_MS - 60_000); + // The useCountdown hook re-evaluates on each render + await page.reload(); // Unlock button should now be enabled const unlockBtn = page.getByRole('button', { name: /^unlock$/i }).first(); diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..0d52fcc --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,6 @@ +User-agent: * +Allow: / +Disallow: /webhooks +Disallow: /alerts + +Sitemap: https://smartdrop.io/sitemap.xml diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..0234d26 --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,38 @@ + + + + https://smartdrop.io/ + 2026-09-24 + 1.0 + + + https://smartdrop.io/leaderboard + 2026-09-24 + 0.9 + + + https://smartdrop.io/prices + 2026-09-24 + 0.9 + + + https://smartdrop.io/contributors + 2026-09-24 + 0.8 + + + https://smartdrop.io/farm + 2026-09-24 + 0.9 + + + https://smartdrop.io/airdrops + 2026-09-24 + 0.8 + + + https://smartdrop.io/history + 2026-09-24 + 0.7 + + diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 573009b..f573b80 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -53,6 +53,9 @@ export default async function RootLayout({ return ( + + + {/* #404 — In server mode the middleware sets a nonce-bearing CSP header, so the static meta tag would duplicate/override it. Only render the meta tag in static-export mode where no middleware runs. */} diff --git a/src/lib/theme.ts b/src/lib/theme.ts index 1dcce3f..6eb3777 100644 --- a/src/lib/theme.ts +++ b/src/lib/theme.ts @@ -2,7 +2,7 @@ import { extendTheme, type ThemeConfig } from "@chakra-ui/react"; const config: ThemeConfig = { initialColorMode: "dark", - useSystemColorMode: false, + useSystemColorMode: true, }; const theme = extendTheme({