index.jsx 631 B

12345678910111213141516171819202122232425262728
  1. import React, { Component } from "react";
  2. import PropTypes from "prop-types";
  3. import { translate } from "react-i18next";
  4. @translate(["home"], { wait: true })
  5. export default class Home extends Component {
  6. static propTypes = {
  7. t: PropTypes.func,
  8. };
  9. static defaultProps = {
  10. t: () => {},
  11. };
  12. render() {
  13. const { t } = this.props;
  14. return (
  15. <div>
  16. <h2>{ t("home:title") }</h2>
  17. <h2>{ t("home:officialStations") }</h2>
  18. <h2>{ t("home:communityStations") }</h2>
  19. <h2>{ t("home:users", { context: "male", count: 5 }) }</h2>
  20. <h2>{ t("home:users", { context: "female", count: 1 }) }</h2>
  21. </div>
  22. );
  23. }
  24. }