diff --git a/src/router/routes/app.routes.tsx b/src/router/routes/app.routes.tsx index 2588e610..363f38df 100644 --- a/src/router/routes/app.routes.tsx +++ b/src/router/routes/app.routes.tsx @@ -1,9 +1,15 @@ -import { Route, Navigate } from 'react-router-dom' +import { Route } from 'react-router-dom' import { lazy } from 'react' import AppLayout from '@/layouts/app-layout' import UserInfoLayout from '@/layouts/userinfo-layout' +// --- Migration landing (root) --- +// Replaces the prior `Navigate to="/app"` so visitors to `app.codatta.io` +// see the "Codatta is now Humanbased." brand-rename announcement first. +// Existing `/app/*` deep links still work for current users. +const MigrationLanding = lazy(() => import('@/views/migration-landing')) + // --- Home & top-level app pages --- const Home = lazy(() => import('@/views/home')) const AppLeaderboard = lazy(() => import('@/views/leaderboard')) @@ -56,7 +62,7 @@ const ReferralApp = lazy(() => import('@/views/referral-app')) export const appRoutes = ( <> - } /> + } /> {/* Mobile routes */} diff --git a/src/views/migration-landing.tsx b/src/views/migration-landing.tsx new file mode 100644 index 00000000..456b8d24 --- /dev/null +++ b/src/views/migration-landing.tsx @@ -0,0 +1,144 @@ +/** + * Codatta → Humanbased migration landing. + * + * Replaces the root `/` redirect to `/app`. When a visitor lands on + * app.codatta.io they see the brand-rename announcement first, with two + * pill CTAs: + * + * - "Migrate your account" → https://humanbased.ai/migrate + * The destination /migrate page sets the `hb_migrated=true` funnel + * cookie on mount itself — we can't drop it from here because + * browsers block cross-domain cookie writes (Domain=.humanbased.ai + * set from app.codatta.io is silently rejected). + * + * - "Humanbased.ai" → https://humanbased.ai (the marketing home). + * + * Layout mirrors the DS reference (Humanbased Design System (1) / + * ui_kits/contributor/codatta.html): centered 40×40 mark + 64/80 bold + * headline ("Codatta is now\nHumanbased.") + 288px column of two pills. + * + * Existing app paths (`/app/*`, `/account/*`, etc.) still resolve as + * before — only the root index was redirected. Bookmarks into the legacy + * app continue to work during the cutover window. + */ + +import type { CSSProperties } from 'react' + +const SANS = 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif' + +const HUMANBASED_MIGRATE_URL = 'https://contributor.humanbased.ai/migrate' +const HUMANBASED_HOME_URL = 'https://contributor.humanbased.ai' + +const styles = { + page: { + minHeight: '100dvh', + boxSizing: 'border-box', + padding: 12, + background: '#F5F5F5', + fontFamily: SANS, + } as CSSProperties, + panel: { + width: '100%', + minHeight: 'calc(100dvh - 24px)', + background: '#FFFFFF', + borderRadius: 12, + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + boxSizing: 'border-box', + overflow: 'auto', + } as CSSProperties, + hero: { + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + textAlign: 'center', + gap: 32, + } as CSSProperties, + title: { + margin: 0, + font: `700 64px/80px ${SANS}`, + color: '#2E2E2E', + letterSpacing: 0, + textWrap: 'balance', + } as CSSProperties, + actions: { + marginTop: 8, + display: 'flex', + flexDirection: 'column', + gap: 16, + width: 288, + } as CSSProperties, + btn: { + width: '100%', + height: 44, + padding: '0 22px', + boxSizing: 'border-box', + display: 'inline-flex', + alignItems: 'center', + justifyContent: 'center', + border: 0, + borderRadius: 100, + cursor: 'pointer', + font: `500 14px/22px ${SANS}`, + textDecoration: 'none', + transition: 'background 80ms ease, transform 80ms ease', + } as CSSProperties, + btnPrimary: { + background: '#2E2E2E', + color: '#FFFFFF', + } as CSSProperties, + btnSecondary: { + background: '#F2F2F2', + color: '#2E2E2E', + } as CSSProperties, +} + +function HBMark({ size = 40 }: { size?: number }) { + return ( + + + + ) +} + +export default function MigrationLanding() { + return ( +
+
+
+ +

+ Codatta is now +
+ Humanbased. +

+ +
+
+
+ ) +}