Created
April 2, 2020 03:06
-
-
Save smcnally/1647f8f055749627df9c9abf3eac790f to your computer and use it in GitHub Desktop.
looping through all properties, through lists of properties I filter, and generally less Insane ways to do what I did here
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/smcnally/GP-IQ/commit/53afcc3a3f6dfe118e83c9feadf586c6de88991a#r38218311 | |
let scoreLabel = props.scoreLabel; | |
let successImg = props.successImg; | |
let bio = props.bio; | |
// ad naseum | |
if (scoreLabel) { | |
scoreLabel = <p className="result-answer" dangerouslySetInnerHTML={{__html: props.scoreLabel}} />; | |
} else { | |
scoreLabel = ''; | |
} | |
if (successImg) { | |
successImg = <img className="constrain-300x600" src={props.successImg} alt="Success" />; | |
} else { | |
successImg = ''; | |
} | |
if (bio) { | |
bio = <p className="result-bio" dangerouslySetInnerHTML={{__html: props.bio}} />; | |
} | |
// ad naseum | |
// and buggering the whole thing by moving to something better than properties this way in 16.x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment