@fortawesome/free-brands-svg-icons#faSoundcloud JavaScript Examples
The following examples show how to use
@fortawesome/free-brands-svg-icons#faSoundcloud.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Campaign.jsx From journey.io with MIT License | 4 votes |
render() {
console.log('state', this.state);
const getId = url => {
const regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/;
const match = url.match(regExp);
return match && match[2].length === 11 ? match[2] : null;
};
const videoUrl = this.state.campaignLinks.video || '';
const videoId = getId(videoUrl);
const campaignDisplay =
Object.keys(this.state.campaignLinks).length > 0 ? (
<div>
<iframe
width="290"
height="200"
src={`http://www.youtube.com/embed/${videoId}`}
frameBorder="0"
/>
<br />
<br />
<div className="d-flex flex-row">
<a
className="socialMediaLink"
href={this.state.campaignLinks.spotify}
>
<FontAwesomeIcon
style={{ width: '2vw', height: '2vw' }}
icon={faSpotify}
/>
</a>
<br />
<a
className="socialMediaLink"
href={this.state.campaignLinks.instagram}
>
<FontAwesomeIcon
style={{ width: '2vw', height: '2vw' }}
icon={faInstagram}
/>
</a>
<br />
<a
className="socialMediaLink"
href={this.state.campaignLinks.facebook}
>
<FontAwesomeIcon
style={{ width: '2vw', height: '2vw' }}
icon={faFacebook}
/>
</a>
<br />
<a
className="socialMediaLink"
href={this.state.campaignLinks.soundcloud}
>
<FontAwesomeIcon
style={{ width: '2vw', height: '2vw' }}
icon={faSoundcloud}
/>
</a>
<br />
<a
className="socialMediaLink"
href={this.state.campaignLinks.twitter}
>
<FontAwesomeIcon
style={{ width: '2vw', height: '2vw' }}
icon={faTwitter}
/>
</a>
<br />
<a
className="socialMediaLink"
href={this.state.campaignLinks.youtube}
>
<FontAwesomeIcon
style={{ width: '2vw', height: '2vw' }}
icon={faYoutube}
/>
</a>
<br />
<br />
</div>
{this.state.campaignLinks.bio}
<br />
<br />
</div>
) : (
<div></div>
);
return (
<div className="d-flex mx-auto">
<Card
style={{ width: '60em' }}
className="mx-auto justify-content-center shadow p-3 mb-5 bg-white rounded row justify-content-center align-self-center"
>
<Card.Title>
<h2>
Let {this.props.artistName} know that you want to see them in your
city!
</h2>
</Card.Title>
<br />
<div className="row">
<div className="col-8">
<Map campaignId={this.props.campaignId} />
</div>
<div className="col-4">
{campaignDisplay}
<LocationSearchInput
handleChange={this.handleChange}
handleSelect={this.handleSelect}
submitInterest={this.submitInterest}
address={this.state.address}
/>
</div>
</div>
</Card>
</div>
);
}