File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
components/sections/profile Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,12 @@ export default function ProfileHeader() {
57
57
58
58
const username = useMemo ( ( ) => user ?. displayName , [ user ?. displayName ] ) ;
59
59
60
+ const isCurrentUser = useMemo ( ( ) => username ?. toLowerCase ( ) === authUser ?. displayName ?. toLowerCase ( ) , [ authUser , username ] ) ;
61
+
62
+ const showKycVerificationButton = useMemo ( ( ) => {
63
+ return isCurrentUser && ! isKycVerified ;
64
+ } , [ isCurrentUser , isKycVerified ] ) ;
65
+
60
66
const dispatch = useDispatch ( ) ;
61
67
const triggerKYCVerification = ( ) => {
62
68
dispatch ( openVerificationModal ( { } ) ) ;
@@ -117,7 +123,7 @@ export default function ProfileHeader() {
117
123
{ t ( "profile.header.connect-discord" ) }
118
124
</ Button >
119
125
) }
120
- { ! isKycVerified && (
126
+ { ! isKycVerified && showKycVerificationButton && (
121
127
< Button variant = "outline-primary" className = "flex mx-auto text-base" onClick = { triggerKYCVerification } >
122
128
{ t ( "profile.header.sumsub.verify" ) }
123
129
</ Button >
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ const Achievement = () => {
129
129
< div className = "mt-5 flex flex-col md:gap-6 gap-5" >
130
130
< AchievementViewItem name = { t ( "profile.achievement.award" ) as string } >
131
131
< div className = "inline-flex items-center space-x-2 pr-3 bg-gray-200 p-1 rounded-full" >
132
- < Avatar user = { user } size = "small-fixed" hideVerificationBadge />
132
+ < Avatar user = { achievement . user } size = "small-fixed" hideVerificationBadge />
133
133
< p className = "text-sm md:text-base" > { achievement ?. metadata ?. recipientName } </ p >
134
134
</ div >
135
135
</ AchievementViewItem >
Original file line number Diff line number Diff line change 1
- import { Submission } from "./bounty" ;
1
+ import { Submission , User } from "./bounty" ;
2
2
import { Community } from "./community" ;
3
3
import { Metadata } from "./course" ;
4
4
@@ -18,6 +18,7 @@ export interface Certificate {
18
18
description : string ;
19
19
submission : Submission ;
20
20
minting : Minting ;
21
+ user : User ;
21
22
}
22
23
23
24
/**
You can’t perform that action at this time.
0 commit comments