Skip to content

Instantly share code, notes, and snippets.

@JNaftali
Created December 8, 2017 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JNaftali/c8ae950b1b70b838cc483dffa117577c to your computer and use it in GitHub Desktop.
Save JNaftali/c8ae950b1b70b838cc483dffa117577c to your computer and use it in GitHub Desktop.
Looking for abstraction
{user.location ? (
<p className="info-location">{user.location}</p>
) : (
isCurrentUser && <AddInfo handleClick={toggleEdit} text="Add location" />
)}
{user.title ? (
<p className="info-title">{getTitleString(user.title)}</p>
) : (
isCurrentUser && (
<AddInfo handleClick={toggleEdit} text="Are you a reader or writer?" />
)
)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment