mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
no need both iOSLink and AndroidLink
Summary: **motivation** if users showcase data only have `linkAppStore` or `linkPlayStore` , not both. They will be render as a not link block. like `D.I.T.` or `烘焙帮` **Test plan** Befor: ![2016-06-07 2 03 27](https://cloud.githubusercontent.com/assets/73235/15847463/a9c5922c-2cb8-11e6-902e-32a942d4f1bd.png) After: ![2016-06-07 2 03 15](https://cloud.githubusercontent.com/assets/73235/15847467/b039df50-2cb8-11e6-893c-7cc25d876a5c.png) Closes https://github.com/facebook/react-native/pull/7966 Differential Revision: D3398002 fbshipit-source-id: 4c9cbbe34fbda5d84a7165415c67559191b08b25
This commit is contained in:
parent
7742900931
commit
2c59dca7b6
11
website/src/react-native/showcase.js
vendored
11
website/src/react-native/showcase.js
vendored
@ -1087,7 +1087,7 @@ var AppList = React.createClass({
|
||||
<div>
|
||||
<img src={app.icon} alt={app.name} />
|
||||
<h3>{app.name}</h3>
|
||||
{app.linkAppStore && app.linkPlayStore ? this._renderLinks(app) : null}
|
||||
{app.linkAppStore || app.linkPlayStore ? this._renderLinks(app) : null}
|
||||
<p>By {app.author}</p>
|
||||
{this._renderBlogPosts(app)}
|
||||
{this._renderSourceLink(app)}
|
||||
@ -1167,11 +1167,14 @@ var AppList = React.createClass({
|
||||
},
|
||||
|
||||
_renderLinks: function(app) {
|
||||
var linkAppStore = app.linkAppStore ? <a href={app.linkAppStore} target="_blank">iOS</a> : '';
|
||||
var linkPlayStore = app.linkPlayStore ? <a href={app.linkPlayStore} target="_blank">Android</a> : '';
|
||||
|
||||
return (
|
||||
<p>
|
||||
<a href={app.linkAppStore} target="_blank">iOS</a>
|
||||
{' '}·{' '}
|
||||
<a href={app.linkPlayStore} target="_blank">Android</a>
|
||||
{linkAppStore}
|
||||
{linkAppStore && linkPlayStore ? ' · ' : ''}
|
||||
{linkPlayStore}
|
||||
</p>
|
||||
);
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user