diff --git a/src/App.js b/src/App.js index a650aee..697db6f 100644 --- a/src/App.js +++ b/src/App.js @@ -6,37 +6,46 @@ import ArticlesPage from './components/routes/articles' import UserForm from './components/user-form' import Filters from './components/filters' import Counter from './components/counter' +import HandleLng from './components/handle-lng' +import {GLOSSARY} from './constants' import 'react-select/dist/react-select.css' import CommentsPage from './components/routes/comments-page' class App extends Component { - static propTypes = { - }; - + componentWillMount() { + this.compileGlossary() + } + static childContextTypes = { - user: PropTypes.string + user: PropTypes.string, + glossary: PropTypes.object } state = { - username: '' + username: '', + glossary: {}, + lng: 1 } getChildContext() { return { - user: this.state.username + user: this.state.username, + glossary: this.state.glossary } } render() { console.log('---', 'rendering App') + const {glossary} = this.state return (
+ {radioElements} +
+ ) + } +} + +export default HandleLng \ No newline at end of file diff --git a/src/components/loader.js b/src/components/loader.js index 9418787..89d2151 100644 --- a/src/components/loader.js +++ b/src/components/loader.js @@ -1,9 +1,15 @@ -import React from 'react' +import React, {Component} from 'react' +import PropTypes from 'prop-types' -function Loader() { - return ( -