From 827f16a21764167b5ece2f707b9f28dbc343d94d Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Sun, 8 Feb 2026 20:50:13 +0100 Subject: [PATCH] feat: add VerificationModal component and enhance welcome page layout with improved accessibility and styling --- app/welcome/page.tsx | 92 ++++++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 34 deletions(-) diff --git a/app/welcome/page.tsx b/app/welcome/page.tsx index 1c3f64f..0d3606e 100644 --- a/app/welcome/page.tsx +++ b/app/welcome/page.tsx @@ -44,6 +44,7 @@ import { } from '@ciphera-net/ui' import Link from 'next/link' import ScriptSetupBlock from '@/components/sites/ScriptSetupBlock' +import VerificationModal from '@/components/sites/VerificationModal' const TOTAL_STEPS = 5 const DEFAULT_ORG_NAME = 'My workspace' @@ -96,6 +97,7 @@ function WelcomeContent() { const [siteLoading, setSiteLoading] = useState(false) const [siteError, setSiteError] = useState('') const [createdSite, setCreatedSite] = useState(null) + const [showVerificationModal, setShowVerificationModal] = useState(false) const [redirectingCheckout, setRedirectingCheckout] = useState(false) const [hadPendingCheckout, setHadPendingCheckout] = useState(null) @@ -320,7 +322,7 @@ function WelcomeContent() { 'bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-800 rounded-2xl shadow-sm p-8 max-w-lg mx-auto' return ( -
+
-

+

Choose your workspace -

+

Continue with an existing workspace or create a new one.

@@ -378,7 +380,7 @@ function WelcomeContent() { type="button" onClick={() => handleSelectWorkspace(org)} disabled={!!switchingOrgId} - className="w-full flex items-center justify-between gap-3 rounded-xl border border-neutral-200 dark:border-neutral-700 bg-neutral-50 dark:bg-neutral-800/50 hover:bg-neutral-100 dark:hover:bg-neutral-800 hover:border-brand-orange/50 px-4 py-3 text-left transition-colors disabled:opacity-60" + className="w-full flex items-center justify-between gap-3 rounded-xl border border-neutral-200 dark:border-neutral-700 bg-neutral-50 dark:bg-neutral-800/50 hover:bg-neutral-100 dark:hover:bg-neutral-800 hover:border-brand-orange/50 px-4 py-3 text-left transition-colors disabled:opacity-60 focus:outline-none focus:ring-2 focus:ring-brand-orange focus:ring-offset-2" > {org.organization_name || 'Workspace'} @@ -437,7 +439,7 @@ function WelcomeContent() {
@@ -508,7 +510,7 @@ function WelcomeContent() { ) : ( - <> - -

- - View pricing - -

- + )}
- {showPendingCheckoutInStep3 && ( + {showPendingCheckoutInStep3 ? (

+ ) : ( +

+ + View pricing + +

)} )} @@ -594,7 +595,7 @@ function WelcomeContent() {
@@ -681,9 +682,9 @@ function WelcomeContent() {
-

+

You're all set -

+

{createdSite ? `"${createdSite.name}" is ready. Add the script to your site to start collecting data.` @@ -700,6 +701,21 @@ function WelcomeContent() { )} + {createdSite && ( +

+ +

+ Check if your site is sending data correctly. +

+
+ )} +
)}
+ + {createdSite && ( + setShowVerificationModal(false)} + site={createdSite} + /> + )} )}