Skip to content

Commit ee75884

Browse files
authored
Merge pull request #181 from infimum90/#141-No-contextual-onboarding-for-first-time-unverified-users-on-dashboard
#141 no contextual onboarding for first time unverified users on dashboard
2 parents a71ea0b + 51c416a commit ee75884

1 file changed

Lines changed: 52 additions & 10 deletions

File tree

apps/web/app/dashboard/page.tsx

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { useWalletStore } from '@/store/wallet';
1212
import { useProfile } from '@/hooks/useProfile';
1313
import { WalletConnect } from '@/components/shared/WalletConnect';
1414
import { InvoiceTableSkeleton, ActivityTimelineSkeleton } from '@/components/shared/SkeletonLoader';
15-
import { Layers, Plus, ShieldAlert } from 'lucide-react';
15+
import { Layers, Plus, ShieldAlert, CheckCircle2, Circle, Lock } from 'lucide-react';
1616
import { Invoice } from '@/types';
1717
import { motion, AnimatePresence } from 'framer-motion';
1818
import { formatAmount } from '@/lib/assets';
@@ -140,23 +140,65 @@ export default function SMEDashboard() {
140140
? 'bg-primary hover:bg-primary-hover text-black shadow-[0_0_15px_rgba(0,212,170,0.1)]'
141141
: 'bg-neutral-800 text-slate-500 border border-neutral-700 cursor-not-allowed opacity-60'
142142
}`}
143-
title={!isVerified ? 'Verification required to create invoices' : undefined}
143+
title={!isVerified ? 'Please complete your profile registration to unlock invoice creation' : undefined}
144144
>
145145
<Plus className="w-4 h-4" />
146146
<span>Create Invoice</span>
147147
</button>
148148
</div>
149149

150-
{/* Warning Banner for Unverified Profiles */}
150+
{/* Onboarding checklist — shown only while the user is unverified */}
151151
{!isVerified && (
152-
<div className="bg-amber-500/10 border border-amber-500/20 rounded-lg p-4 flex items-start gap-3 font-mono text-xs text-amber-400 shadow-[0_0_20px_rgba(245,158,11,0.02)]">
153-
<ShieldAlert className="w-5 h-5 shrink-0 mt-0.5" />
154-
<div className="space-y-1">
155-
<span className="font-bold uppercase">Profile Verification Required</span>
156-
<p className="text-slate-400 leading-relaxed text-[11px]">
157-
Your connected wallet address is not verified on-chain. Go to the <Link href="/profile" className="text-primary hover:underline font-bold">[Profile Page]</Link> to register your business credentials and unlock dashboard operations.
158-
</p>
152+
<div className="bg-card border border-border rounded-lg p-5 space-y-4 shadow-[0_0_25px_rgba(0,212,170,0.03)]">
153+
<div className="flex items-center gap-2.5">
154+
<div className="w-7 h-7 rounded-full border border-primary/30 bg-primary/10 flex items-center justify-center shrink-0">
155+
<span className="text-primary text-xs font-bold font-mono">!</span>
156+
</div>
157+
<div>
158+
<h3 className="text-sm font-bold font-mono tracking-wider text-white uppercase">Get Started</h3>
159+
<p className="text-[10px] text-slate-500 font-mono leading-relaxed">
160+
Complete the steps below to unlock full dashboard operations.
161+
</p>
162+
</div>
163+
</div>
164+
165+
{/* Step 1: Connect Wallet — always completed by this point */}
166+
<div className="flex items-center gap-3 p-3 rounded-lg border border-primary/20 bg-primary/5">
167+
<CheckCircle2 className="w-5 h-5 text-primary shrink-0" />
168+
<div className="flex-1 min-w-0">
169+
<span className="text-xs font-bold font-mono text-white">Connect Wallet</span>
170+
<p className="text-[10px] text-slate-500 truncate">Wallet connected successfully</p>
171+
</div>
172+
<span className="text-[9px] font-bold font-mono text-primary uppercase shrink-0">Done</span>
173+
</div>
174+
175+
{/* Step 2: Register Profile — pending action */}
176+
<div className="flex items-center gap-3 p-3 rounded-lg border border-amber-500/20 bg-amber-500/5">
177+
<Circle className="w-5 h-5 text-amber-400 shrink-0" />
178+
<div className="flex-1 min-w-0">
179+
<span className="text-xs font-bold font-mono text-amber-400">Register Profile</span>
180+
<p className="text-[10px] text-slate-500 truncate">Register your business credentials on-chain</p>
181+
</div>
182+
<span className="text-[9px] font-bold font-mono text-amber-400 uppercase shrink-0">Pending</span>
183+
</div>
184+
185+
{/* Step 3: Create Invoice — locked behind verification */}
186+
<div className="flex items-center gap-3 p-3 rounded-lg border border-border/40 bg-card">
187+
<Lock className="w-5 h-5 text-slate-600 shrink-0" />
188+
<div className="flex-1 min-w-0">
189+
<span className="text-xs font-bold font-mono text-slate-400">Create Invoice</span>
190+
<p className="text-[10px] text-slate-500 truncate">Requires verified profile</p>
191+
</div>
192+
<span className="text-[9px] font-bold font-mono text-slate-600 uppercase shrink-0">Locked</span>
159193
</div>
194+
195+
{/* CTA to profile registration page */}
196+
<Link
197+
href="/profile"
198+
className="w-full mt-2 bg-primary hover:bg-primary-hover text-black font-bold uppercase tracking-wider text-xs rounded px-4 py-2.5 flex items-center justify-center gap-1.5 shadow-[0_0_15px_rgba(0,212,170,0.1)] transition-all"
199+
>
200+
<span>Complete Profile Registration</span>
201+
</Link>
160202
</div>
161203
)}
162204

0 commit comments

Comments
 (0)