diff --git a/apps/web/src/app/account-verification/page.tsx b/apps/web/src/app/account-verification/page.tsx index f681883e30..f47334fa58 100644 --- a/apps/web/src/app/account-verification/page.tsx +++ b/apps/web/src/app/account-verification/page.tsx @@ -2,11 +2,9 @@ import { redirect } from 'next/navigation'; import { headers } from 'next/headers'; import { Suspense } from 'react'; import { StytchClient } from '@/components/auth/StytchClient'; -import { AnimatedLogo } from '@/components/AnimatedLogo'; -import BigLoader from '@/components/BigLoader'; +import { AccountCreationScreen } from '@/components/auth/AccountCreationScreen'; import { getUserFromAuthOrRedirect } from '@/lib/user/server'; import { getStytchStatus, handleSignupPromotion, type SignupSource } from '@/lib/stytch'; -import { PageContainer } from '@/components/layouts/PageContainer'; import { isValidCallbackPath } from '@/lib/getSignInCallbackUrl'; import { maybeInterceptWithSurvey } from '@/lib/survey-redirect'; import { isOpenclawAdvisorCallback } from '@/lib/signup-source'; @@ -80,21 +78,13 @@ export default async function AccountVerificationPage({ searchParams }: AppPageP } return ( - -
-
- -
- {stytchStatus === null && ( - - - - )} - -
- © {new Date().getFullYear()} Kilo Code -
-
-
+ <> + {stytchStatus === null && ( + + + + )} + + ); } diff --git a/apps/web/src/components/AnimatedKiloLogo.tsx b/apps/web/src/components/AnimatedKiloLogo.tsx index 5c2315fd08..2478eb6e87 100644 --- a/apps/web/src/components/AnimatedKiloLogo.tsx +++ b/apps/web/src/components/AnimatedKiloLogo.tsx @@ -1,7 +1,20 @@ 'use client'; -import { DotLottieReact } from '@lottiefiles/dotlottie-react'; +import dynamic from 'next/dynamic'; +import { useReducedMotion } from 'motion/react'; +import KiloLogo from '@/components/KiloLogo'; + +const DotLottieReact = dynamic( + () => import('@lottiefiles/dotlottie-react').then(module => module.DotLottieReact), + { ssr: false } +); export default function AnimatedKiloLogo() { + const reduceMotion = useReducedMotion(); + + if (reduceMotion === true) { + return ; + } + return ; } diff --git a/apps/web/src/components/auth/AccountCreationScreen.module.css b/apps/web/src/components/auth/AccountCreationScreen.module.css new file mode 100644 index 0000000000..72261b203c --- /dev/null +++ b/apps/web/src/components/auth/AccountCreationScreen.module.css @@ -0,0 +1,33 @@ +.shimmer { + font-size: 0.9375rem; + color: var(--muted-foreground); + background-image: linear-gradient( + 100deg, + var(--foreground-subtle) 30%, + color-mix(in srgb, var(--foreground) 55%, var(--muted-foreground)) 50%, + var(--foreground-subtle) 70% + ); + background-size: 200% 100%; + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + animation: shimmer 3.2s linear infinite; +} + +@keyframes shimmer { + from { + background-position: 200% 50%; + } + + to { + background-position: -200% 50%; + } +} + +@media (prefers-reduced-motion: reduce) { + .shimmer { + background-image: none; + -webkit-text-fill-color: currentColor; + animation: none; + } +} diff --git a/apps/web/src/components/auth/AccountCreationScreen.tsx b/apps/web/src/components/auth/AccountCreationScreen.tsx new file mode 100644 index 0000000000..1f4a0f8712 --- /dev/null +++ b/apps/web/src/components/auth/AccountCreationScreen.tsx @@ -0,0 +1,18 @@ +import AnimatedKiloLogo from '@/components/AnimatedKiloLogo'; +import { PageContainer } from '@/components/layouts/PageContainer'; +import styles from './AccountCreationScreen.module.css'; + +export function AccountCreationScreen() { + return ( + +
+
+ +

Creating your account

+
+
+
+ ); +} diff --git a/apps/web/src/tests/account-verification-redirect.test.ts b/apps/web/src/tests/account-verification-redirect.test.ts index 47e1714eb7..e1afd744c7 100644 --- a/apps/web/src/tests/account-verification-redirect.test.ts +++ b/apps/web/src/tests/account-verification-redirect.test.ts @@ -63,15 +63,8 @@ jest.mock('@/lib/credit-campaigns', () => ({ jest.mock('@/components/auth/StytchClient', () => ({ StytchClient: () => null, })); -jest.mock('@/components/AnimatedLogo', () => ({ - AnimatedLogo: () => null, -})); -jest.mock('@/components/BigLoader', () => ({ - __esModule: true, - default: () => null, -})); -jest.mock('@/components/layouts/PageContainer', () => ({ - PageContainer: ({ children }: { children: React.ReactNode }) => children, +jest.mock('@/components/auth/AccountCreationScreen', () => ({ + AccountCreationScreen: () => null, })); // isValidCallbackPath is NOT mocked — we use the real implementation