Skip to content

Commit

Permalink
Restore iOS, Android links on Showcase.
Browse files Browse the repository at this point in the history
Summary: Closes #10292

Differential Revision: D3990986

Pulled By: bestander

fbshipit-source-id: dd9711ce0f54bdfc801aa6cf1cf0b55cb4d9c12c
  • Loading branch information
hramos authored and Facebook Github Bot committed Oct 9, 2016
1 parent 5c0dec1 commit 016f47c
Show file tree
Hide file tree
Showing 3 changed files with 464 additions and 503 deletions.
87 changes: 67 additions & 20 deletions website/src/react-native/index.js
Expand Up @@ -11,7 +11,68 @@ var Prism = require('Prism');
var React = require('React');
var Site = require('Site');

var apps = require('./showcaseData').pinned;
var apps = [
{
name: 'Facebook',
icon: 'https://lh3.googleusercontent.com/ZZPdzvlpK9r_Df9C3M7j1rNRi7hhHRvPhlklJ3lfi5jk86Jd1s0Y5wcQ1QgbVaAP5Q=w300',
infoLink: 'https://itunes.apple.com/app/facebook/id284882215',
},
{
name: 'Facebook Ads Manager',
icon: 'http://is5.mzstatic.com/image/pf/us/r30/Purple5/v4/9e/16/86/9e1686ef-cc55-805a-c977-538ddb5e6832/mzl.gqbhwitj.png',
infoLink: 'https://itunes.apple.com/us/app/facebook-ads-manager/id964397083?mt=8',
},
{
name: 'Facebook Groups',
icon: 'http://is4.mzstatic.com/image/pf/us/r30/Purple69/v4/57/f8/4c/57f84c0c-793d-5f9a-95ee-c212d0369e37/mzl.ugjwfhzx.png',
infoLink: 'https://itunes.apple.com/us/app/facebook-groups/id931735837?mt=8',
},
{
name: 'Instagram',
icon: 'http://a4.mzstatic.com/us/r30/Purple62/v4/1f/8d/f9/1f8df910-8ec7-3b8e-0104-d44e869f4d65/icon175x175.jpeg',
infoLink: 'https://www.instagram.com/',
},
{
name: 'Airbnb',
icon: 'https://a2.muscache.com/airbnb/static/icons/apple-touch-icon-180x180-bcbe0e3960cd084eb8eaf1353cf3c730.png',
infoLink: 'https://www.airbnb.com/mobile',
},
{
name: 'Baidu(手机百度)',
icon: 'http://a3.mzstatic.com/us/r30/Purple62/v4/90/7c/9b/907c9b4e-556d-1a45-45d4-0ea801719abd/icon175x175.png',
infoLink: 'http://baike.baidu.com/link?url=TW8YhcVN4tO_Jz5VqMclCjGhf12EEqMD_TeVC6efe2REZlx80r6T0dX96hdmNl36XogLyExXzrvFU9rFeqxg_K',
},
{
name: 'Discord',
icon: 'http://a5.mzstatic.com/us/r30/Purple5/v4/c1/2f/4c/c12f4cba-1d9a-f6bf-2240-04085d3470ec/icon175x175.jpeg',
infoLink: 'https://itunes.apple.com/us/app/discord-chat-for-gamers/id985746746?mt=8',
},
{
name: 'Gyroscope',
icon: 'https://media.gyrosco.pe/images/magneto/180x180.png',
infoLink: 'https://itunes.apple.com/app/apple-store/id1104085053?pt=117927205&ct=website&mt=8',
},
{
name: 'li.st',
icon: 'https://lh3.googleusercontent.com/tXt0HgJ7dCgOnuQ-lQr1P7E57mnOYfwXhRsV9lGcPwHPVvrDAN6YmpLVFgy88qKrkFI=w300',
infoLink: 'https://play.google.com/store/apps/details?id=st.li.listapp',
},
{
name: 'QQ',
icon: 'http://pp.myapp.com/ma_icon/0/icon_6633_1461768893/96',
infoLink: 'http://android.myapp.com/myapp/detail.htm?apkName=com.tencent.mobileqq',
},
{
name: 'Townske',
icon: 'http://a3.mzstatic.com/us/r30/Purple69/v4/8b/42/20/8b4220af-5165-91fd-0f05-014332df73ef/icon175x175.png',
infoLink: 'https://itunes.apple.com/us/app/townske-stunning-city-guides/id1018136179?ls=1&mt=8',
},
{
name: 'Vogue',
icon: 'http://a2.mzstatic.com/us/r30/Purple30/v4/06/24/92/0624927f-a389-746c-27f9-e2466d59e55b/icon175x175.jpeg',
infoLink: 'https://itunes.apple.com/app/apple-store/id1087973225?pt=45076&ct=site-promo&mt=8',
}
];

var AppList = React.createClass({
render: function() {
Expand All @@ -23,39 +84,25 @@ var AppList = React.createClass({
},

_renderApp: function(app, i) {
var inner = (
<div>
{this._renderIcon(app)}
</div>
);

return (
<div className="showcase" key={i}>
{inner}
{this._renderIcon(app)}
</div>
);
},

_renderIcon: function(app) {
var icon = (
<img src={app.icon} alt={app.name} />
);

return (
<a href={app.defaultLink}>
{icon}
<a href={app.infoLink}>
<img src={app.icon} alt={app.name} />
</a>
);
},

_renderTitle: function(app) {
var title = (
<h3>{app.name}</h3>
);

return (
<a href={app.defaultLink}>
{title}
<a href={app.infoLink}>
<h3>{app.name}</h3>
</a>
);
},
Expand Down

0 comments on commit 016f47c

Please sign in to comment.