forked from Gitlink/forgeplus-react
17 lines
370 B
React
17 lines
370 B
React
|
|
import React from 'react';
|
||
|
|
|
||
|
|
function Profile({children,sureFunc,showCompeleteDialog , completeProfile, className}) {
|
||
|
|
|
||
|
|
function checkProfile() {
|
||
|
|
if(!completeProfile){
|
||
|
|
showCompeleteDialog && showCompeleteDialog();
|
||
|
|
}else{
|
||
|
|
sureFunc();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
return(
|
||
|
|
<a className={className} onClick={checkProfile}>{children}</a>
|
||
|
|
)
|
||
|
|
}
|
||
|
|
export default Profile;
|