fix: update supporter badge logic (#38461)
* fix: update supporter badge logic * fix: update snapshot
This commit is contained in:
@ -20,6 +20,7 @@ const propTypes = {
|
|||||||
isLocked: PropTypes.bool,
|
isLocked: PropTypes.bool,
|
||||||
showAbout: PropTypes.bool,
|
showAbout: PropTypes.bool,
|
||||||
showCerts: PropTypes.bool,
|
showCerts: PropTypes.bool,
|
||||||
|
showDonation: PropTypes.bool,
|
||||||
showHeatMap: PropTypes.bool,
|
showHeatMap: PropTypes.bool,
|
||||||
showLocation: PropTypes.bool,
|
showLocation: PropTypes.bool,
|
||||||
showName: PropTypes.bool,
|
showName: PropTypes.bool,
|
||||||
@ -97,6 +98,7 @@ function renderProfile(user) {
|
|||||||
profileUI: {
|
profileUI: {
|
||||||
showAbout = false,
|
showAbout = false,
|
||||||
showCerts = false,
|
showCerts = false,
|
||||||
|
showDonation = false,
|
||||||
showHeatMap = false,
|
showHeatMap = false,
|
||||||
showLocation = false,
|
showLocation = false,
|
||||||
showName = false,
|
showName = false,
|
||||||
@ -126,12 +128,14 @@ function renderProfile(user) {
|
|||||||
isDonating
|
isDonating
|
||||||
} = user;
|
} = user;
|
||||||
|
|
||||||
|
console.log(showDonation);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Camper
|
<Camper
|
||||||
about={showAbout ? about : null}
|
about={showAbout ? about : null}
|
||||||
githubProfile={githubProfile}
|
githubProfile={githubProfile}
|
||||||
isDonating={isDonating}
|
isDonating={showDonation ? isDonating : null}
|
||||||
isGithub={isGithub}
|
isGithub={isGithub}
|
||||||
isLinkedIn={isLinkedIn}
|
isLinkedIn={isLinkedIn}
|
||||||
isTwitter={isTwitter}
|
isTwitter={isTwitter}
|
||||||
|
@ -19,6 +19,9 @@ exports[`<Profile/> renders correctly 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="avatar-container col-xs-12"
|
class="avatar-container col-xs-12"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class=""
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
alt="string's avatar"
|
alt="string's avatar"
|
||||||
@ -27,6 +30,7 @@ exports[`<Profile/> renders correctly 1`] = `
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
class="row"
|
class="row"
|
||||||
>
|
>
|
||||||
|
@ -68,7 +68,6 @@ function Camper({
|
|||||||
const avatar = /example.com|identicon.org/.test(picture) ? (
|
const avatar = /example.com|identicon.org/.test(picture) ? (
|
||||||
<Identicon
|
<Identicon
|
||||||
bg={'#858591'}
|
bg={'#858591'}
|
||||||
className={`${isDonating ? 'supporter-img' : ''}`}
|
|
||||||
count={5}
|
count={5}
|
||||||
fg={'#0A0A23'}
|
fg={'#0A0A23'}
|
||||||
padding={5}
|
padding={5}
|
||||||
@ -78,7 +77,7 @@ function Camper({
|
|||||||
) : (
|
) : (
|
||||||
<Image
|
<Image
|
||||||
alt={username + "'s avatar"}
|
alt={username + "'s avatar"}
|
||||||
className={`avatar${isDonating ? ' supporter-img' : ''}`}
|
className='avatar'
|
||||||
responsive={true}
|
responsive={true}
|
||||||
src={picture}
|
src={picture}
|
||||||
/>
|
/>
|
||||||
@ -87,7 +86,7 @@ function Camper({
|
|||||||
<div>
|
<div>
|
||||||
<Row>
|
<Row>
|
||||||
<Col className='avatar-container' xs={12}>
|
<Col className='avatar-container' xs={12}>
|
||||||
{avatar}
|
<div className={isDonating ? 'supporter-img' : ''}>{avatar}</div>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<SocialIcons
|
<SocialIcons
|
||||||
|
Reference in New Issue
Block a user