File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/components/sections/profile Expand file tree Collapse file tree 1 file changed +7
-1
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 >
You can’t perform that action at this time.
0 commit comments