/
Header.jsx
80 lines (65 loc) · 2.98 KB
/
Header.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import cx from 'classnames';
import clock from '../assets/images/icons/icon_clock.svg';
import rocket from '../assets/images/icons/icon_rocket.svg';
const mapStateToProps = ({
currentCourse,
}) => ({
currentCourse,
});
export class Header extends React.Component {
static propTypes = {
currentCourse: PropTypes.shape(),
};
static defaultProps = {
currentCourse: {},
};
render() {
const {
currentCourse,
} = this.props;
const headerClasses = cx('site-header', {
'-yellow': currentCourse.title,
});
return (
<header className={headerClasses}>
<div className="container site-header__content">
<div className="branding">
<a href="/" className="branding__content" />
</div>
<div className="course-header">
{currentCourse.title && <h2 className="course-header__title">{currentCourse.title}</h2>}
{currentCourse.time && <p className="course-header__duration" data-icon={clock}>{currentCourse.time} minutes</p>}
</div>
<div className="links">
<ul className="links__list -social">
<li className="links__item">
<a className="no-link-style tracked-link" href="https://blog.eleven-labs.com/feed.xml" title="Ajoutez-nous à votre veille" rel="nofollow noreferrer"><i className="fa fa-fw fa-rss"></i></a>
</li>
<li className="links__item">
<a className="no-link-style tracked-link" href="https://github.com/eleven-labs" title="Suivez-nous sur GitHub" rel="nofollow noreferrer"><i className="fa fa-fw fa-github"></i></a>
</li>
<li className="links__item">
<a className="no-link-style tracked-link" href="https://twitter.com/eleven_labs" title="Suivez-nous sur Twitter" rel="nofollow noreferrer"><i className="fa fa-fw fa-twitter"></i></a>
</li>
<li className="links__item">
<a className="no-link-style tracked-link" href="https://www.facebook.com/11Labs" title="Suivez-nous sur Facebook" rel="nofollow noreferrer"><i className="fa fa-fw fa-facebook"></i></a>
</li>
<li className="links__item">
<a className="no-link-style tracked-link" href="https://fr.linkedin.com/company/eleven-labs" title="Suivez-nous sur LinkedIn" rel="nofollow noreferrer"><i className="fa fa-fw fa-linkedin"></i></a>
</li>
<li className="links__item">
<a className="no-link-style tracked-link" href="https://eleven-labs.com" title="Découvrez Eleven Labs" rel="nofollow">
<img className="corporate-logo" src={rocket} alt="Découvrez Eleven Labs" height="19"></img>
</a>
</li>
</ul>
</div>
</div>
</header>
);
}
}
export default connect(mapStateToProps, {})(Header);