summaryrefslogtreecommitdiff
path: root/web-ui/src
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/src')
-rw-r--r--web-ui/src/account_recovery/account_recovery.js14
-rw-r--r--web-ui/src/account_recovery/page.js8
-rw-r--r--web-ui/src/common/input_field/input_field.js5
-rw-r--r--web-ui/src/common/submit_button/submit_button.js4
-rw-r--r--web-ui/src/i18n.js18
5 files changed, 31 insertions, 18 deletions
diff --git a/web-ui/src/account_recovery/account_recovery.js b/web-ui/src/account_recovery/account_recovery.js
index 6c12e326..eac14bf7 100644
--- a/web-ui/src/account_recovery/account_recovery.js
+++ b/web-ui/src/account_recovery/account_recovery.js
@@ -20,16 +20,16 @@ import { render } from 'react-dom'
import a11y from 'react-a11y'
import { I18nextProvider } from 'react-i18next'
-import Page from './page'
-import i18n from '../i18n'
-
import 'font-awesome/scss/font-awesome.scss'
-if(process.env.NODE_ENV === 'development') a11y(React);
+import PageWrapper from './page'
+import i18n from '../i18n'
+
+if (process.env.NODE_ENV === 'development') a11y(React)
render(
- <I18nextProvider i18n={ i18n }>
- <Page/>
+ <I18nextProvider i18n={i18n}>
+ <PageWrapper />
</I18nextProvider>,
document.getElementById('root')
-);
+)
diff --git a/web-ui/src/account_recovery/page.js b/web-ui/src/account_recovery/page.js
index d1bcb464..396788e7 100644
--- a/web-ui/src/account_recovery/page.js
+++ b/web-ui/src/account_recovery/page.js
@@ -32,8 +32,8 @@ export const Page = ({ t }) => (
<InputField name='email' label={t('backup-account.input-label')} />
<SubmitButton buttonText={t('backup-account.button')} />
<div>
- <a href="/">
- <i className="fa fa-angle-left" aria-hidden="true"></i>
+ <a href='/'>
+ <i className='fa fa-angle-left' aria-hidden='true' />
<span>{t('back-to-inbox')}</span>
</a>
</div>
@@ -41,4 +41,8 @@ export const Page = ({ t }) => (
</div>
)
+Page.propTypes = {
+ t: React.PropTypes.func.isRequired
+}
+
export default translate('', { wait: true })(Page)
diff --git a/web-ui/src/common/input_field/input_field.js b/web-ui/src/common/input_field/input_field.js
index 43899419..70d18618 100644
--- a/web-ui/src/common/input_field/input_field.js
+++ b/web-ui/src/common/input_field/input_field.js
@@ -26,4 +26,9 @@ const InputField = ({ label, name }) => (
</div>
)
+InputField.propTypes = {
+ label: React.PropTypes.string.isRequired,
+ name: React.PropTypes.string.isRequired
+}
+
export default InputField
diff --git a/web-ui/src/common/submit_button/submit_button.js b/web-ui/src/common/submit_button/submit_button.js
index 89cfc55b..ea1bbf26 100644
--- a/web-ui/src/common/submit_button/submit_button.js
+++ b/web-ui/src/common/submit_button/submit_button.js
@@ -23,4 +23,8 @@ const SubmitButton = ({ buttonText }) => (
<input type='submit' className='submit-button' value={buttonText} />
)
+SubmitButton.propTypes = {
+ buttonText: React.PropTypes.string.isRequired
+}
+
export default SubmitButton
diff --git a/web-ui/src/i18n.js b/web-ui/src/i18n.js
index 9c6ad550..b68f17ae 100644
--- a/web-ui/src/i18n.js
+++ b/web-ui/src/i18n.js
@@ -16,15 +16,15 @@
*/
import i18n from 'i18next'
import i18nBackend from 'i18nextXHRBackend'
-import i18nDetector from 'i18nextBrowserLanguageDetector'
+import I18nDetector from 'i18nextBrowserLanguageDetector'
-const detector = new i18nDetector();
-const detect = detector.detect.bind(detector);
+const detector = new I18nDetector()
+const detect = detector.detect.bind(detector)
-detector.detect = function(detectionOrder) {
- let result = detect(detectionOrder);
- return result.replace('-', '_');
-};
+detector.detect = (detectionOrder) => {
+ const result = detect(detectionOrder)
+ return result.replace('-', '_')
+}
i18n
.use(i18nBackend)
@@ -34,6 +34,6 @@ i18n
backend: {
loadPath: 'assets/locales/{{lng}}/{{ns}}.json'
}
- });
+ })
-export default i18n;
+export default i18n