Skip to content

Commit

Permalink
fix: show user truncated address in profile and propose to KYC & sign…
Browse files Browse the repository at this point in the history
…-in if no email
  • Loading branch information
nezz0746 committed Oct 2, 2024
1 parent abf32f3 commit 163eb01
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/components/Kyc/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const KYCComponent = () => {
</div>
) : (
<GlobalKYCComponent
intialStep={user ? 1 : 0}
intialStep={user?.user?.email ? 1 : 0}
offrampForm={{
email: user?.user?.email ?? '',
name: user?.user?.full_name ?? '',
Expand Down
33 changes: 16 additions & 17 deletions src/components/Profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -390,24 +390,23 @@ export const Profile = () => {
}}
/>

{user?.user?.email && (
<span className="flex justify-center gap-1 text-h8 font-normal">
{user?.user?.email}
<div className={`flex flex-row items-center justify-center `}>
<div
className={`kyc-badge select-none ${user?.user?.kycStatus === 'verified' ? 'bg-kyc-green px-2 py-1 text-black' : 'bg-gray-1 text-white hover:ring-2 hover:ring-gray-2'} w-max`}
>
{user?.user?.kycStatus === 'verified' ? (
'KYC'
) : (
<Link className="px-2 py-1" href={'/kyc'}>
NO KYC
</Link>
)}
</div>
<span className="flex justify-center gap-1 text-h8 font-normal">
{user?.user?.email ??
utils.shortenAddressLong(user.accounts[0].account_identifier)}
<div className={`flex flex-row items-center justify-center `}>
<div
className={`kyc-badge select-none ${user?.user?.kycStatus === 'verified' ? 'bg-kyc-green px-2 py-1 text-black' : 'bg-gray-1 text-white hover:ring-2 hover:ring-gray-2'} w-max`}
>
{user?.user?.kycStatus === 'verified' ? (
'KYC'
) : (
<Link className="px-2 py-1" href={'/kyc'}>
NO KYC
</Link>
)}
</div>
</span>
)}
</div>
</span>
</div>
</div>
<button className="btn btn-xl h-8 w-full" onClick={handleLogout}>
Expand Down

0 comments on commit 163eb01

Please sign in to comment.