61 lines
1.9 KiB
JavaScript
Raw Normal View History

import './MenuComponent.scss';
import { FormattedMessage, injectIntl } from 'react-intl';
2020-12-31 17:38:30 +01:00
import React, { Component } from 'react';
2022-06-15 00:47:13 +02:00
import { URL_add_parameter } from '../../services/parameters.service';
class MenuComponent extends Component {
// constructor(props) {
// super(props);
// this.state = {};
// }
honhonhon() {
window.location.href = URL_add_parameter(window.location.href, "lang", "fr");
}
heygovna() {
window.location.href = URL_add_parameter(window.location.href, "lang", "en");
}
render() {
const buttonsLanguagesMessage = this.props.intl.messages.global.buttons.languages;
2022-10-31 00:37:52 +01:00
return <section id="menu" class="hero is-primary dontPrint">
<div class="hero-body">
<div class="container">
<div class="columns">
<div class="column">
<h1 class="title">
<FormattedMessage id="title" />
</h1>
<h2 class="subtitle">
<FormattedMessage id="subtitle" />
</h2>
</div>
<div class="column is-hidden-touch">
<div id="langButtons">
<div class="buttons">
<span className="button is-light" onClick={this.honhonhon} aria-label="Visiter le site en Français">
{buttonsLanguagesMessage.fr}
</span>
<span className="button is-light" onClick={this.heygovna} aria-label="Visit the website in English">
{buttonsLanguagesMessage.en}
</span>
2020-12-31 18:22:46 +01:00
</div>
</div>
</div>
</div>
</div>
</div>
</section>;
}
}
// export default connect(
// ({ MenuComponent }) => ({ ...MenuComponent }),
// dispatch => bindActionCreators({ ...MenuComponentActions }, dispatch)
// )( MenuComponent );
export default injectIntl(MenuComponent)