kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
DevelopersChallenge: 'fizz|buzz' --> 'soap|box'
rodzic
d2363d63bd
commit
ac88038166
|
@ -38,7 +38,7 @@ class DevelopersChallenge extends React.Component {
|
||||||
const { intl, dispatch } = this.props;
|
const { intl, dispatch } = this.props;
|
||||||
const { answer } = this.state;
|
const { answer } = this.state;
|
||||||
|
|
||||||
if (answer === 'buzzfizz') {
|
if (answer === 'boxsoap') {
|
||||||
dispatch(changeSettingImmediate(['isDeveloper'], true));
|
dispatch(changeSettingImmediate(['isDeveloper'], true));
|
||||||
dispatch(snackbar.success(intl.formatMessage(messages.success)));
|
dispatch(snackbar.success(intl.formatMessage(messages.success)));
|
||||||
} else {
|
} else {
|
||||||
|
@ -49,8 +49,8 @@ class DevelopersChallenge extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const { intl } = this.props;
|
const { intl } = this.props;
|
||||||
|
|
||||||
const challenge = `function fizzbuzz() {
|
const challenge = `function soapbox() {
|
||||||
return 'fizz|buzz'.split('|').reverse().join('');
|
return 'soap|box'.split('|').reverse().join('');
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -60,7 +60,7 @@ class DevelopersChallenge extends React.Component {
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='developers.challenge.message'
|
id='developers.challenge.message'
|
||||||
defaultMessage='What is the result of calling {function}?'
|
defaultMessage='What is the result of calling {function}?'
|
||||||
values={{ function: <span className='code'>fizzbuzz()</span> }}
|
values={{ function: <span className='code'>soapbox()</span> }}
|
||||||
/>
|
/>
|
||||||
<pre className='code'>
|
<pre className='code'>
|
||||||
{challenge}
|
{challenge}
|
||||||
|
|
Ładowanie…
Reference in New Issue