Skip to content

Commit

Permalink
fix: implement translate function correctly
Browse files Browse the repository at this point in the history
closes #150
  • Loading branch information
juancarlosfarah committed Aug 2, 2019
1 parent 76f35b0 commit 3816c2d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/space/SpaceNotFound.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { withRouter } from 'react-router';
import { withTranslation } from 'react-i18next';
import Button from '@material-ui/core//Button';
import CssBaseline from '@material-ui/core/CssBaseline';
import AppBar from '@material-ui/core/AppBar';
Expand All @@ -24,6 +25,7 @@ class SpaceNotFound extends Component {
};

static propTypes = {
t: PropTypes.func.isRequired,
classes: PropTypes.shape({}).isRequired,
theme: PropTypes.shape({}).isRequired,
history: PropTypes.shape({ length: PropTypes.number.isRequired })
Expand All @@ -39,11 +41,12 @@ class SpaceNotFound extends Component {
};

render() {
const { open, t } = this.state;
const { open } = this.state;
const {
history: { replace },
classes,
theme,
t,
} = this.props;
return (
<div className={classes.root}>
Expand Down Expand Up @@ -121,4 +124,6 @@ class SpaceNotFound extends Component {

const StyledComponent = withStyles(Styles, { withTheme: true })(SpaceNotFound);

export default withRouter(StyledComponent);
const TranslatedComponent = withTranslation()(StyledComponent);

export default withRouter(TranslatedComponent);

0 comments on commit 3816c2d

Please sign in to comment.