diff --git a/src/MarketingApp.jsx b/src/MarketingApp.jsx
index 4f862fb..9f1d182 100644
--- a/src/MarketingApp.jsx
+++ b/src/MarketingApp.jsx
@@ -23,6 +23,9 @@ const AppRedirect = () => {
const router = createBrowserRouter([
{ path: '/', element: },
+ // Mirrors the app router, where /welcome is the canonical Landing path —
+ // without it this falls through to AppRedirect and bounces to /login.
+ { path: '/welcome', element: },
{ path: '/privacy', element: },
{ path: '/terms', element: },
{ path: '*', element: },
@@ -50,17 +53,20 @@ const ThemeClass = () => {
return null
}
+// Same ordering constraint as contexts/Contexts.jsx: ThemeContext reads the
+// active language via useLocalization() to pick the text direction, so
+// LocalizationProvider has to sit above it.
const MarketingApp = () => (
-
-
-
-
+
+
+
+
-
-
-
+
+
+
)
export default MarketingApp
diff --git a/src/main.jsx b/src/main.jsx
index 0aefb3d..e2ea75c 100644
--- a/src/main.jsx
+++ b/src/main.jsx
@@ -5,10 +5,13 @@ import React from 'react'
import ReactDOM from 'react-dom/client'
const marketingHosts = new Set(['donetick.com', 'www.donetick.com'])
+// ?site=marketing works in every build, not just dev, so preview deploys on
+// *.pages.dev can exercise the marketing bundle. Landing on the app host with
+// the flag set just renders the marketing pages — nothing sensitive is gated
+// on this.
const isMarketingSite =
marketingHosts.has(window.location.hostname) ||
- (import.meta.env.DEV &&
- new URLSearchParams(window.location.search).get('site') === 'marketing')
+ new URLSearchParams(window.location.search).get('site') === 'marketing'
export const Site = React.lazy(() =>
isMarketingSite ? import('./MarketingApp.jsx') : import('./Application.jsx'),