Skip to content

Commit

Permalink
remove call to language api
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbedouret committed Mar 11, 2020
1 parent e3decd2 commit 746fcbd
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/components/Board/SymbolSearch/SymbolSearch.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,15 @@ export class SymbolSearch extends PureComponent {
this.state = {
value: '',
suggestions: [],
skin: undefined,
hair: undefined,
skin: 'white',
hair: 'brown',
symbolSets: symbolSetsOptions
};

this.symbols = [];
}

async componentDidMount() {
const {
intl: { locale }
} = this.props;
try {
const languagesResponse = await API.getLanguage(`${locale}-`);
const { skin, hair } = languagesResponse;
if (skin && hair) await this.setState({ skin, hair });
} catch (err) {}

import('../../../api/mulberry-symbols.json').then(
({ default: mulberrySymbols }) => {
this.symbols = this.translateSymbols(mulberrySymbols);
Expand Down

0 comments on commit 746fcbd

Please sign in to comment.