This repository has been archived by the owner on May 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a2c4e7c
commit a1a32f8
Showing
5 changed files
with
39 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
import React, { PureComponent } from 'react'; | ||
import { connect } from 'react-redux'; | ||
import { localise } from 'react-locale-hoc'; | ||
|
||
import InitialHome from '../layouts/InitialHome'; | ||
|
||
class HomeView extends PureComponent { | ||
render() { | ||
if (this.props.kind === 'pop') { | ||
return <div>You just pressed the Back button.</div>; | ||
const { kind, t } = this.props; | ||
|
||
if (kind === 'pop') { | ||
return <div>{t('message')}</div>; | ||
} | ||
|
||
return <InitialHome />; | ||
} | ||
} | ||
|
||
export default connect( | ||
state => ({ | ||
kind: state.location.kind, | ||
}), | ||
{} | ||
)(HomeView); | ||
export default localise( | ||
connect( | ||
state => ({ | ||
kind: state.location.kind, | ||
}), | ||
{} | ||
)(HomeView) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
import React from 'react'; | ||
|
||
const NextView = () => <div>Now, try pressing the Back button of the browser.</div>; | ||
import { localise } from 'react-locale-hoc'; | ||
|
||
export default NextView; | ||
const NextView = ({ t }) => { | ||
return <div>{t('next_instructions')}</div>; | ||
}; | ||
|
||
export default localise(NextView); |