Pass plain components, rather than functions returning them

pull/21833/head
Stefan Parviainen 2017-11-14 20:09:52 +01:00
parent 788be67c75
commit df6d5cc2b4
5 changed files with 7 additions and 7 deletions

View File

@ -936,7 +936,7 @@ export default React.createClass({
'Your community hasn\'t got a Long Description, a HTML page to show to community members.<br />' +
'Click here to open settings and give it one!',
{},
{ 'br': () => <br /> },
{ 'br': <br /> },
) }
</div>;
}

View File

@ -272,7 +272,7 @@ export default React.createClass({
'homeserver, or you can pick a <a>different server</a>.',
{},
{
'span': () => <span>{ this.props.homeserverUrl }</span>,
'span': <span>{ this.props.homeserverUrl }</span>,
'a': (sub) => <a href="#" onClick={this.props.onDifferentServerClicked}>{ sub }</a>,
},
) }

View File

@ -374,7 +374,7 @@ export const MsisdnAuthEntry = React.createClass({
return (
<div>
<p>{ _t("A text message has been sent to %(msisdn)s",
{ msisdn: () => <i>this._msisdn</i> },
{ msisdn: <i>this._msisdn</i> },
) }
</p>
<p>{ _t("Please enter the code it contains:") }</p>

View File

@ -490,7 +490,7 @@ module.exports = React.createClass({
{ _t(
"Press <StartChatButton> to start a chat with someone",
{},
{ 'StartChatButton': () => <StartChatButton size="16" callout={true} /> },
{ 'StartChatButton': <StartChatButton size="16" callout={true} /> },
) }
</div>;
case 'im.vector.fake.recent':
@ -500,8 +500,8 @@ module.exports = React.createClass({
" <RoomDirectoryButton> to browse the directory",
{},
{
'CreateRoomButton': () => <CreateRoomButton size="16" callout={true} />,
'RoomDirectoryButton': () => <RoomDirectoryButton size="16" callout={true} />,
'CreateRoomButton': <CreateRoomButton size="16" callout={true} />,
'RoomDirectoryButton': <RoomDirectoryButton size="16" callout={true} />,
},
) }
</div>;

View File

@ -938,7 +938,7 @@ module.exports = React.createClass({
{ Object.keys(events_levels).map(function(event_type, i) {
let label = plEventsToLabels[event_type];
if (label) label = _t(label);
else label = _t("To send events of type <eventType/>, you must be a", {}, { 'eventType': () => <code>{ event_type }</code> });
else label = _t("To send events of type <eventType/>, you must be a", {}, { 'eventType': <code>{ event_type }</code> });
return (
<div className="mx_RoomSettings_powerLevel" key={event_type}>
<span className="mx_RoomSettings_powerLevelKey">{ label } </span>